diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AbnormalTimePeriod.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AbnormalTimePeriod.java new file mode 100644 index 00000000000..a5a9ad2bbbe --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AbnormalTimePeriod.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class representing Abnormal Time Period identified in diagnosis. + */ +public class AbnormalTimePeriod { + /** + * Start time of the downtime. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * End time of the downtime. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * List of Possible Cause of downtime. + */ + @JsonProperty(value = "events") + private List events; + + /** + * List of proposed solutions. + */ + @JsonProperty(value = "solutions") + private List solutions; + + /** + * 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 AbnormalTimePeriod object itself. + */ + public AbnormalTimePeriod 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 AbnormalTimePeriod object itself. + */ + public AbnormalTimePeriod withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the events value. + * + * @return the events value + */ + public List events() { + return this.events; + } + + /** + * Set the events value. + * + * @param events the events value to set + * @return the AbnormalTimePeriod object itself. + */ + public AbnormalTimePeriod withEvents(List events) { + this.events = events; + return this; + } + + /** + * Get the solutions value. + * + * @return the solutions value + */ + public List solutions() { + return this.solutions; + } + + /** + * Set the solutions value. + * + * @param solutions the solutions value to set + * @return the AbnormalTimePeriod object itself. + */ + public AbnormalTimePeriod withSolutions(List solutions) { + this.solutions = solutions; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AccessControlEntryAction.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AccessControlEntryAction.java new file mode 100644 index 00000000000..d29824e6807 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AccessControlEntryAction.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AccessControlEntryAction. + */ +public enum AccessControlEntryAction { + /** Enum value Permit. */ + PERMIT("Permit"), + + /** Enum value Deny. */ + DENY("Deny"); + + /** The actual serialized value for a AccessControlEntryAction instance. */ + private String value; + + AccessControlEntryAction(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AccessControlEntryAction instance. + * + * @param value the serialized value to parse. + * @return the parsed AccessControlEntryAction object, or null if unable to parse. + */ + @JsonCreator + public static AccessControlEntryAction fromString(String value) { + AccessControlEntryAction[] items = AccessControlEntryAction.values(); + for (AccessControlEntryAction item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Address.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Address.java new file mode 100644 index 00000000000..ddb656ee88a --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Address.java @@ -0,0 +1,173 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Address information for domain registration. + */ +public class Address { + /** + * First line of an Address. + */ + @JsonProperty(value = "address1", required = true) + private String address1; + + /** + * The second line of the Address. Optional. + */ + @JsonProperty(value = "address2") + private String address2; + + /** + * The city for the address. + */ + @JsonProperty(value = "city", required = true) + private String city; + + /** + * The country for the address. + */ + @JsonProperty(value = "country", required = true) + private String country; + + /** + * The postal code for the address. + */ + @JsonProperty(value = "postalCode", required = true) + private String postalCode; + + /** + * The state or province for the address. + */ + @JsonProperty(value = "state", required = true) + private String state; + + /** + * Get the address1 value. + * + * @return the address1 value + */ + public String address1() { + return this.address1; + } + + /** + * Set the address1 value. + * + * @param address1 the address1 value to set + * @return the Address object itself. + */ + public Address withAddress1(String address1) { + this.address1 = address1; + return this; + } + + /** + * Get the address2 value. + * + * @return the address2 value + */ + public String address2() { + return this.address2; + } + + /** + * Set the address2 value. + * + * @param address2 the address2 value to set + * @return the Address object itself. + */ + public Address withAddress2(String address2) { + this.address2 = address2; + return this; + } + + /** + * Get the city value. + * + * @return the city value + */ + public String city() { + return this.city; + } + + /** + * Set the city value. + * + * @param city the city value to set + * @return the Address object itself. + */ + public Address withCity(String city) { + this.city = city; + return this; + } + + /** + * Get the country value. + * + * @return the country value + */ + public String country() { + return this.country; + } + + /** + * Set the country value. + * + * @param country the country value to set + * @return the Address object itself. + */ + public Address withCountry(String country) { + this.country = country; + return this; + } + + /** + * Get the postalCode value. + * + * @return the postalCode value + */ + public String postalCode() { + return this.postalCode; + } + + /** + * Set the postalCode value. + * + * @param postalCode the postalCode value to set + * @return the Address object itself. + */ + public Address withPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Get the state value. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the state value. + * + * @param state the state value to set + * @return the Address object itself. + */ + public Address withState(String state) { + this.state = state; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AnalysisData.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AnalysisData.java new file mode 100644 index 00000000000..68543f968b5 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AnalysisData.java @@ -0,0 +1,149 @@ +/** + * 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.web; + +import com.microsoft.azure.management.web.implementation.DetectorDefinitionInner; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class Representing Detector Evidence used for analysis. + */ +public class AnalysisData { + /** + * Name of the Detector. + */ + @JsonProperty(value = "source") + private String source; + + /** + * Detector Definition. + */ + @JsonProperty(value = "detectorDefinition") + private DetectorDefinitionInner detectorDefinition; + + /** + * Source Metrics. + */ + @JsonProperty(value = "metrics") + private List metrics; + + /** + * Additional Source Data. + */ + @JsonProperty(value = "data") + private List> data; + + /** + * Detector Meta Data. + */ + @JsonProperty(value = "detectorMetaData") + private ResponseMetaData detectorMetaData; + + /** + * Get the source value. + * + * @return the source value + */ + public String source() { + return this.source; + } + + /** + * Set the source value. + * + * @param source the source value to set + * @return the AnalysisData object itself. + */ + public AnalysisData withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the detectorDefinition value. + * + * @return the detectorDefinition value + */ + public DetectorDefinitionInner detectorDefinition() { + return this.detectorDefinition; + } + + /** + * Set the detectorDefinition value. + * + * @param detectorDefinition the detectorDefinition value to set + * @return the AnalysisData object itself. + */ + public AnalysisData withDetectorDefinition(DetectorDefinitionInner detectorDefinition) { + this.detectorDefinition = detectorDefinition; + return this; + } + + /** + * Get the metrics value. + * + * @return the metrics value + */ + public List metrics() { + return this.metrics; + } + + /** + * Set the metrics value. + * + * @param metrics the metrics value to set + * @return the AnalysisData object itself. + */ + public AnalysisData withMetrics(List metrics) { + this.metrics = metrics; + return this; + } + + /** + * Get the data value. + * + * @return the data value + */ + public List> data() { + return this.data; + } + + /** + * Set the data value. + * + * @param data the data value to set + * @return the AnalysisData object itself. + */ + public AnalysisData withData(List> data) { + this.data = data; + return this; + } + + /** + * Get the detectorMetaData value. + * + * @return the detectorMetaData value + */ + public ResponseMetaData detectorMetaData() { + return this.detectorMetaData; + } + + /** + * Set the detectorMetaData value. + * + * @param detectorMetaData the detectorMetaData value to set + * @return the AnalysisData object itself. + */ + public AnalysisData withDetectorMetaData(ResponseMetaData detectorMetaData) { + this.detectorMetaData = detectorMetaData; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ApiDefinitionInfo.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ApiDefinitionInfo.java new file mode 100644 index 00000000000..555b6d05655 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ApiDefinitionInfo.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about the formal API definition for the app. + */ +public class ApiDefinitionInfo { + /** + * The URL of the API definition. + */ + @JsonProperty(value = "url") + private String url; + + /** + * Get the url value. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set the url value. + * + * @param url the url value to set + * @return the ApiDefinitionInfo object itself. + */ + public ApiDefinitionInfo withUrl(String url) { + this.url = url; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AppServiceCertificate.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AppServiceCertificate.java new file mode 100644 index 00000000000..ce4ee6ff798 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AppServiceCertificate.java @@ -0,0 +1,89 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Key Vault container for a certificate that is purchased through Azure. + */ +public class AppServiceCertificate { + /** + * Key Vault resource Id. + */ + @JsonProperty(value = "keyVaultId") + private String keyVaultId; + + /** + * Key Vault secret name. + */ + @JsonProperty(value = "keyVaultSecretName") + private String keyVaultSecretName; + + /** + * Status of the Key Vault secret. Possible values include: 'Initialized', + * 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', + * 'OperationNotPermittedOnKeyVault', + * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', + * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', + * 'Unknown'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private KeyVaultSecretStatus provisioningState; + + /** + * Get the keyVaultId value. + * + * @return the keyVaultId value + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set the keyVaultId value. + * + * @param keyVaultId the keyVaultId value to set + * @return the AppServiceCertificate object itself. + */ + public AppServiceCertificate withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get the keyVaultSecretName value. + * + * @return the keyVaultSecretName value + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set the keyVaultSecretName value. + * + * @param keyVaultSecretName the keyVaultSecretName value to set + * @return the AppServiceCertificate object itself. + */ + public AppServiceCertificate withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public KeyVaultSecretStatus provisioningState() { + return this.provisioningState; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AppServiceEnvironment.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AppServiceEnvironment.java new file mode 100644 index 00000000000..8f7dcc38fbe --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AppServiceEnvironment.java @@ -0,0 +1,787 @@ +/** + * 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.web; + +import java.util.List; +import com.microsoft.azure.management.web.implementation.StampCapacityInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of an App Service Environment. + */ +public class AppServiceEnvironment { + /** + * Name of the App Service Environment. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Location of the App Service Environment, e.g. "West US". + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * Provisioning state of the App Service Environment. Possible values + * include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Current status of the App Service Environment. Possible values include: + * 'Preparing', 'Ready', 'Scaling', 'Deleting'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private HostingEnvironmentStatus status; + + /** + * Name of the Virtual Network for the App Service Environment. + */ + @JsonProperty(value = "vnetName") + private String vnetName; + + /** + * Resource group of the Virtual Network. + */ + @JsonProperty(value = "vnetResourceGroupName") + private String vnetResourceGroupName; + + /** + * Subnet of the Virtual Network. + */ + @JsonProperty(value = "vnetSubnetName") + private String vnetSubnetName; + + /** + * Description of the Virtual Network. + */ + @JsonProperty(value = "virtualNetwork", required = true) + private VirtualNetworkProfile virtualNetwork; + + /** + * Specifies which endpoints to serve internally in the Virtual Network for + * the App Service Environment. Possible values include: 'None', 'Web', + * 'Publishing'. + */ + @JsonProperty(value = "internalLoadBalancingMode") + private InternalLoadBalancingMode internalLoadBalancingMode; + + /** + * Front-end VM size, e.g. "Medium", "Large". + */ + @JsonProperty(value = "multiSize") + private String multiSize; + + /** + * Number of front-end instances. + */ + @JsonProperty(value = "multiRoleCount") + private Integer multiRoleCount; + + /** + * Description of worker pools with worker size IDs, VM sizes, and number + * of workers in each pool. + */ + @JsonProperty(value = "workerPools", required = true) + private List workerPools; + + /** + * Number of IP SSL addresses reserved for the App Service Environment. + */ + @JsonProperty(value = "ipsslAddressCount") + private Integer ipsslAddressCount; + + /** + * Edition of the metadata database for the App Service Environment, e.g. + * "Standard". + */ + @JsonProperty(value = "databaseEdition", access = JsonProperty.Access.WRITE_ONLY) + private String databaseEdition; + + /** + * Service objective of the metadata database for the App Service + * Environment, e.g. "S0". + */ + @JsonProperty(value = "databaseServiceObjective", access = JsonProperty.Access.WRITE_ONLY) + private String databaseServiceObjective; + + /** + * Number of upgrade domains of the App Service Environment. + */ + @JsonProperty(value = "upgradeDomains", access = JsonProperty.Access.WRITE_ONLY) + private Integer upgradeDomains; + + /** + * Subscription of the App Service Environment. + */ + @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) + private String subscriptionId; + + /** + * DNS suffix of the App Service Environment. + */ + @JsonProperty(value = "dnsSuffix") + private String dnsSuffix; + + /** + * Last deployment action on the App Service Environment. + */ + @JsonProperty(value = "lastAction", access = JsonProperty.Access.WRITE_ONLY) + private String lastAction; + + /** + * Result of the last deployment action on the App Service Environment. + */ + @JsonProperty(value = "lastActionResult", access = JsonProperty.Access.WRITE_ONLY) + private String lastActionResult; + + /** + * List of comma separated strings describing which VM sizes are allowed + * for front-ends. + */ + @JsonProperty(value = "allowedMultiSizes", access = JsonProperty.Access.WRITE_ONLY) + private String allowedMultiSizes; + + /** + * List of comma separated strings describing which VM sizes are allowed + * for workers. + */ + @JsonProperty(value = "allowedWorkerSizes", access = JsonProperty.Access.WRITE_ONLY) + private String allowedWorkerSizes; + + /** + * Maximum number of VMs in the App Service Environment. + */ + @JsonProperty(value = "maximumNumberOfMachines", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximumNumberOfMachines; + + /** + * Description of IP SSL mapping for the App Service Environment. + */ + @JsonProperty(value = "vipMappings", access = JsonProperty.Access.WRITE_ONLY) + private List vipMappings; + + /** + * Current total, used, and available worker capacities. + */ + @JsonProperty(value = "environmentCapacities", access = JsonProperty.Access.WRITE_ONLY) + private List environmentCapacities; + + /** + * Access control list for controlling traffic to the App Service + * Environment. + */ + @JsonProperty(value = "networkAccessControlList") + private List networkAccessControlList; + + /** + * True/false indicating whether the App Service Environment is healthy. + */ + @JsonProperty(value = "environmentIsHealthy", access = JsonProperty.Access.WRITE_ONLY) + private Boolean environmentIsHealthy; + + /** + * Detailed message about with results of the last check of the App Service + * Environment. + */ + @JsonProperty(value = "environmentStatus", access = JsonProperty.Access.WRITE_ONLY) + private String environmentStatus; + + /** + * Resource group of the App Service Environment. + */ + @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /** + * Scale factor for front-ends. + */ + @JsonProperty(value = "frontEndScaleFactor") + private Integer frontEndScaleFactor; + + /** + * Default Scale Factor for FrontEnds. + */ + @JsonProperty(value = "defaultFrontEndScaleFactor", access = JsonProperty.Access.WRITE_ONLY) + private Integer defaultFrontEndScaleFactor; + + /** + * API Management Account associated with the App Service Environment. + */ + @JsonProperty(value = "apiManagementAccountId") + private String apiManagementAccountId; + + /** + * <code>true</code> if the App Service Environment is + * suspended; otherwise, <code>false</code>. 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 = "suspended") + private Boolean suspended; + + /** + * True/false indicating whether the App Service 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 = "dynamicCacheEnabled") + private Boolean dynamicCacheEnabled; + + /** + * Custom settings for changing the behavior of the App Service + * Environment. + */ + @JsonProperty(value = "clusterSettings") + private List clusterSettings; + + /** + * User added ip ranges to whitelist on ASE db. + */ + @JsonProperty(value = "userWhitelistedIpRanges") + private List userWhitelistedIpRanges; + + /** + * 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 AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withName(String name) { + this.name = name; + 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 AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status value. + * + * @return the status value + */ + public HostingEnvironmentStatus status() { + return this.status; + } + + /** + * Get the vnetName value. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the vnetName value. + * + * @param vnetName the vnetName value to set + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the vnetResourceGroupName value. + * + * @return the vnetResourceGroupName value + */ + public String vnetResourceGroupName() { + return this.vnetResourceGroupName; + } + + /** + * Set the vnetResourceGroupName value. + * + * @param vnetResourceGroupName the vnetResourceGroupName value to set + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withVnetResourceGroupName(String vnetResourceGroupName) { + this.vnetResourceGroupName = vnetResourceGroupName; + return this; + } + + /** + * Get the vnetSubnetName value. + * + * @return the vnetSubnetName value + */ + public String vnetSubnetName() { + return this.vnetSubnetName; + } + + /** + * Set the vnetSubnetName value. + * + * @param vnetSubnetName the vnetSubnetName value to set + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withVnetSubnetName(String vnetSubnetName) { + this.vnetSubnetName = vnetSubnetName; + 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 AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + this.virtualNetwork = virtualNetwork; + return this; + } + + /** + * Get the internalLoadBalancingMode value. + * + * @return the internalLoadBalancingMode value + */ + public InternalLoadBalancingMode internalLoadBalancingMode() { + return this.internalLoadBalancingMode; + } + + /** + * Set the internalLoadBalancingMode value. + * + * @param internalLoadBalancingMode the internalLoadBalancingMode value to set + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withInternalLoadBalancingMode(InternalLoadBalancingMode internalLoadBalancingMode) { + this.internalLoadBalancingMode = internalLoadBalancingMode; + return this; + } + + /** + * Get the multiSize value. + * + * @return the multiSize value + */ + public String multiSize() { + return this.multiSize; + } + + /** + * Set the multiSize value. + * + * @param multiSize the multiSize value to set + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withMultiSize(String multiSize) { + this.multiSize = multiSize; + return this; + } + + /** + * Get the multiRoleCount value. + * + * @return the multiRoleCount value + */ + public Integer multiRoleCount() { + return this.multiRoleCount; + } + + /** + * Set the multiRoleCount value. + * + * @param multiRoleCount the multiRoleCount value to set + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withMultiRoleCount(Integer multiRoleCount) { + this.multiRoleCount = multiRoleCount; + return this; + } + + /** + * Get the workerPools value. + * + * @return the workerPools value + */ + public List workerPools() { + return this.workerPools; + } + + /** + * Set the workerPools value. + * + * @param workerPools the workerPools value to set + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withWorkerPools(List workerPools) { + this.workerPools = workerPools; + 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 AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withIpsslAddressCount(Integer ipsslAddressCount) { + this.ipsslAddressCount = ipsslAddressCount; + return this; + } + + /** + * Get the databaseEdition value. + * + * @return the databaseEdition value + */ + public String databaseEdition() { + return this.databaseEdition; + } + + /** + * Get the databaseServiceObjective value. + * + * @return the databaseServiceObjective value + */ + public String databaseServiceObjective() { + return this.databaseServiceObjective; + } + + /** + * Get the upgradeDomains value. + * + * @return the upgradeDomains value + */ + public Integer upgradeDomains() { + return this.upgradeDomains; + } + + /** + * Get the subscriptionId value. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * 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 AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withDnsSuffix(String dnsSuffix) { + this.dnsSuffix = dnsSuffix; + return this; + } + + /** + * Get the lastAction value. + * + * @return the lastAction value + */ + public String lastAction() { + return this.lastAction; + } + + /** + * Get the lastActionResult value. + * + * @return the lastActionResult value + */ + public String lastActionResult() { + return this.lastActionResult; + } + + /** + * Get the allowedMultiSizes value. + * + * @return the allowedMultiSizes value + */ + public String allowedMultiSizes() { + return this.allowedMultiSizes; + } + + /** + * Get the allowedWorkerSizes value. + * + * @return the allowedWorkerSizes value + */ + public String allowedWorkerSizes() { + return this.allowedWorkerSizes; + } + + /** + * Get the maximumNumberOfMachines value. + * + * @return the maximumNumberOfMachines value + */ + public Integer maximumNumberOfMachines() { + return this.maximumNumberOfMachines; + } + + /** + * Get the vipMappings value. + * + * @return the vipMappings value + */ + public List vipMappings() { + return this.vipMappings; + } + + /** + * Get the environmentCapacities value. + * + * @return the environmentCapacities value + */ + public List environmentCapacities() { + return this.environmentCapacities; + } + + /** + * Get the networkAccessControlList value. + * + * @return the networkAccessControlList value + */ + public List networkAccessControlList() { + return this.networkAccessControlList; + } + + /** + * Set the networkAccessControlList value. + * + * @param networkAccessControlList the networkAccessControlList value to set + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withNetworkAccessControlList(List networkAccessControlList) { + this.networkAccessControlList = networkAccessControlList; + return this; + } + + /** + * Get the environmentIsHealthy value. + * + * @return the environmentIsHealthy value + */ + public Boolean environmentIsHealthy() { + return this.environmentIsHealthy; + } + + /** + * Get the environmentStatus value. + * + * @return the environmentStatus value + */ + public String environmentStatus() { + return this.environmentStatus; + } + + /** + * Get the resourceGroup value. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * 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 AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withFrontEndScaleFactor(Integer frontEndScaleFactor) { + this.frontEndScaleFactor = frontEndScaleFactor; + return this; + } + + /** + * Get the defaultFrontEndScaleFactor value. + * + * @return the defaultFrontEndScaleFactor value + */ + public Integer defaultFrontEndScaleFactor() { + return this.defaultFrontEndScaleFactor; + } + + /** + * Get the apiManagementAccountId value. + * + * @return the apiManagementAccountId value + */ + public String apiManagementAccountId() { + return this.apiManagementAccountId; + } + + /** + * Set the apiManagementAccountId value. + * + * @param apiManagementAccountId the apiManagementAccountId value to set + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withApiManagementAccountId(String apiManagementAccountId) { + this.apiManagementAccountId = apiManagementAccountId; + 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 AppServiceEnvironment object itself. + */ + public AppServiceEnvironment 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 AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withDynamicCacheEnabled(Boolean dynamicCacheEnabled) { + this.dynamicCacheEnabled = dynamicCacheEnabled; + return this; + } + + /** + * Get the clusterSettings value. + * + * @return the clusterSettings value + */ + public List clusterSettings() { + return this.clusterSettings; + } + + /** + * Set the clusterSettings value. + * + * @param clusterSettings the clusterSettings value to set + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withClusterSettings(List clusterSettings) { + this.clusterSettings = clusterSettings; + return this; + } + + /** + * Get the userWhitelistedIpRanges value. + * + * @return the userWhitelistedIpRanges value + */ + public List userWhitelistedIpRanges() { + return this.userWhitelistedIpRanges; + } + + /** + * Set the userWhitelistedIpRanges value. + * + * @param userWhitelistedIpRanges the userWhitelistedIpRanges value to set + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withUserWhitelistedIpRanges(List userWhitelistedIpRanges) { + this.userWhitelistedIpRanges = userWhitelistedIpRanges; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AppServicePlanRestrictions.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AppServicePlanRestrictions.java new file mode 100644 index 00000000000..a4cf7aea7a2 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AppServicePlanRestrictions.java @@ -0,0 +1,65 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AppServicePlanRestrictions. + */ +public enum AppServicePlanRestrictions { + /** Enum value None. */ + NONE("None"), + + /** Enum value Free. */ + FREE("Free"), + + /** Enum value Shared. */ + SHARED("Shared"), + + /** Enum value Basic. */ + BASIC("Basic"), + + /** Enum value Standard. */ + STANDARD("Standard"), + + /** Enum value Premium. */ + PREMIUM("Premium"); + + /** The actual serialized value for a AppServicePlanRestrictions instance. */ + private String value; + + AppServicePlanRestrictions(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AppServicePlanRestrictions instance. + * + * @param value the serialized value to parse. + * @return the parsed AppServicePlanRestrictions object, or null if unable to parse. + */ + @JsonCreator + public static AppServicePlanRestrictions fromString(String value) { + AppServicePlanRestrictions[] items = AppServicePlanRestrictions.values(); + for (AppServicePlanRestrictions item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ApplicationLogsConfig.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ApplicationLogsConfig.java new file mode 100644 index 00000000000..908713a5a3c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ApplicationLogsConfig.java @@ -0,0 +1,95 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application logs configuration. + */ +public class ApplicationLogsConfig { + /** + * Application logs to file system configuration. + */ + @JsonProperty(value = "fileSystem") + private FileSystemApplicationLogsConfig fileSystem; + + /** + * Application logs to azure table storage configuration. + */ + @JsonProperty(value = "azureTableStorage") + private AzureTableStorageApplicationLogsConfig azureTableStorage; + + /** + * Application logs to blob storage configuration. + */ + @JsonProperty(value = "azureBlobStorage") + private AzureBlobStorageApplicationLogsConfig azureBlobStorage; + + /** + * Get the fileSystem value. + * + * @return the fileSystem value + */ + public FileSystemApplicationLogsConfig fileSystem() { + return this.fileSystem; + } + + /** + * Set the fileSystem value. + * + * @param fileSystem the fileSystem value to set + * @return the ApplicationLogsConfig object itself. + */ + public ApplicationLogsConfig withFileSystem(FileSystemApplicationLogsConfig fileSystem) { + this.fileSystem = fileSystem; + return this; + } + + /** + * Get the azureTableStorage value. + * + * @return the azureTableStorage value + */ + public AzureTableStorageApplicationLogsConfig azureTableStorage() { + return this.azureTableStorage; + } + + /** + * Set the azureTableStorage value. + * + * @param azureTableStorage the azureTableStorage value to set + * @return the ApplicationLogsConfig object itself. + */ + public ApplicationLogsConfig withAzureTableStorage(AzureTableStorageApplicationLogsConfig azureTableStorage) { + this.azureTableStorage = azureTableStorage; + return this; + } + + /** + * Get the azureBlobStorage value. + * + * @return the azureBlobStorage value + */ + public AzureBlobStorageApplicationLogsConfig azureBlobStorage() { + return this.azureBlobStorage; + } + + /** + * Set the azureBlobStorage value. + * + * @param azureBlobStorage the azureBlobStorage value to set + * @return the ApplicationLogsConfig object itself. + */ + public ApplicationLogsConfig withAzureBlobStorage(AzureBlobStorageApplicationLogsConfig azureBlobStorage) { + this.azureBlobStorage = azureBlobStorage; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealActionType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealActionType.java new file mode 100644 index 00000000000..f33fea81876 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealActionType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AutoHealActionType. + */ +public enum AutoHealActionType { + /** Enum value Recycle. */ + RECYCLE("Recycle"), + + /** Enum value LogEvent. */ + LOG_EVENT("LogEvent"), + + /** Enum value CustomAction. */ + CUSTOM_ACTION("CustomAction"); + + /** The actual serialized value for a AutoHealActionType instance. */ + private String value; + + AutoHealActionType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AutoHealActionType instance. + * + * @param value the serialized value to parse. + * @return the parsed AutoHealActionType object, or null if unable to parse. + */ + @JsonCreator + public static AutoHealActionType fromString(String value) { + AutoHealActionType[] items = AutoHealActionType.values(); + for (AutoHealActionType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealActions.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealActions.java new file mode 100644 index 00000000000..bd9da5b550f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealActions.java @@ -0,0 +1,97 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Actions which to take by the auto-heal module when a rule is triggered. + */ +public class AutoHealActions { + /** + * Predefined action to be taken. Possible values include: 'Recycle', + * 'LogEvent', 'CustomAction'. + */ + @JsonProperty(value = "actionType") + private AutoHealActionType actionType; + + /** + * Custom action to be taken. + */ + @JsonProperty(value = "customAction") + private AutoHealCustomAction customAction; + + /** + * Minimum time the process must execute + * before taking the action. + */ + @JsonProperty(value = "minProcessExecutionTime") + private String minProcessExecutionTime; + + /** + * Get the actionType value. + * + * @return the actionType value + */ + public AutoHealActionType actionType() { + return this.actionType; + } + + /** + * Set the actionType value. + * + * @param actionType the actionType value to set + * @return the AutoHealActions object itself. + */ + public AutoHealActions withActionType(AutoHealActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the customAction value. + * + * @return the customAction value + */ + public AutoHealCustomAction customAction() { + return this.customAction; + } + + /** + * Set the customAction value. + * + * @param customAction the customAction value to set + * @return the AutoHealActions object itself. + */ + public AutoHealActions withCustomAction(AutoHealCustomAction customAction) { + this.customAction = customAction; + return this; + } + + /** + * Get the minProcessExecutionTime value. + * + * @return the minProcessExecutionTime value + */ + public String minProcessExecutionTime() { + return this.minProcessExecutionTime; + } + + /** + * Set the minProcessExecutionTime value. + * + * @param minProcessExecutionTime the minProcessExecutionTime value to set + * @return the AutoHealActions object itself. + */ + public AutoHealActions withMinProcessExecutionTime(String minProcessExecutionTime) { + this.minProcessExecutionTime = minProcessExecutionTime; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealCustomAction.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealCustomAction.java new file mode 100644 index 00000000000..4bc4a9b2a77 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealCustomAction.java @@ -0,0 +1,70 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Custom action to be executed + * when an auto heal rule is triggered. + */ +public class AutoHealCustomAction { + /** + * Executable to be run. + */ + @JsonProperty(value = "exe") + private String exe; + + /** + * Parameters for the executable. + */ + @JsonProperty(value = "parameters") + private String parameters; + + /** + * Get the exe value. + * + * @return the exe value + */ + public String exe() { + return this.exe; + } + + /** + * Set the exe value. + * + * @param exe the exe value to set + * @return the AutoHealCustomAction object itself. + */ + public AutoHealCustomAction withExe(String exe) { + this.exe = exe; + return this; + } + + /** + * Get the parameters value. + * + * @return the parameters value + */ + public String parameters() { + return this.parameters; + } + + /** + * Set the parameters value. + * + * @param parameters the parameters value to set + * @return the AutoHealCustomAction object itself. + */ + public AutoHealCustomAction withParameters(String parameters) { + this.parameters = parameters; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealRules.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealRules.java new file mode 100644 index 00000000000..894bb7bee21 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealRules.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Rules that can be defined for auto-heal. + */ +public class AutoHealRules { + /** + * Conditions that describe when to execute the auto-heal actions. + */ + @JsonProperty(value = "triggers") + private AutoHealTriggers triggers; + + /** + * Actions to be executed when a rule is triggered. + */ + @JsonProperty(value = "actions") + private AutoHealActions actions; + + /** + * Get the triggers value. + * + * @return the triggers value + */ + public AutoHealTriggers triggers() { + return this.triggers; + } + + /** + * Set the triggers value. + * + * @param triggers the triggers value to set + * @return the AutoHealRules object itself. + */ + public AutoHealRules withTriggers(AutoHealTriggers triggers) { + this.triggers = triggers; + return this; + } + + /** + * Get the actions value. + * + * @return the actions value + */ + public AutoHealActions actions() { + return this.actions; + } + + /** + * Set the actions value. + * + * @param actions the actions value to set + * @return the AutoHealRules object itself. + */ + public AutoHealRules withActions(AutoHealActions actions) { + this.actions = actions; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealTriggers.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealTriggers.java new file mode 100644 index 00000000000..27a4198df6e --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AutoHealTriggers.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Triggers for auto-heal. + */ +public class AutoHealTriggers { + /** + * A rule based on total requests. + */ + @JsonProperty(value = "requests") + private RequestsBasedTrigger requests; + + /** + * A rule based on private bytes. + */ + @JsonProperty(value = "privateBytesInKB") + private Integer privateBytesInKB; + + /** + * A rule based on status codes. + */ + @JsonProperty(value = "statusCodes") + private List statusCodes; + + /** + * A rule based on request execution time. + */ + @JsonProperty(value = "slowRequests") + private SlowRequestsBasedTrigger slowRequests; + + /** + * Get the requests value. + * + * @return the requests value + */ + public RequestsBasedTrigger requests() { + return this.requests; + } + + /** + * Set the requests value. + * + * @param requests the requests value to set + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withRequests(RequestsBasedTrigger requests) { + this.requests = requests; + return this; + } + + /** + * Get the privateBytesInKB value. + * + * @return the privateBytesInKB value + */ + public Integer privateBytesInKB() { + return this.privateBytesInKB; + } + + /** + * Set the privateBytesInKB value. + * + * @param privateBytesInKB the privateBytesInKB value to set + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withPrivateBytesInKB(Integer privateBytesInKB) { + this.privateBytesInKB = privateBytesInKB; + return this; + } + + /** + * Get the statusCodes value. + * + * @return the statusCodes value + */ + public List statusCodes() { + return this.statusCodes; + } + + /** + * Set the statusCodes value. + * + * @param statusCodes the statusCodes value to set + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withStatusCodes(List statusCodes) { + this.statusCodes = statusCodes; + return this; + } + + /** + * Get the slowRequests value. + * + * @return the slowRequests value + */ + public SlowRequestsBasedTrigger slowRequests() { + return this.slowRequests; + } + + /** + * Set the slowRequests value. + * + * @param slowRequests the slowRequests value to set + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withSlowRequests(SlowRequestsBasedTrigger slowRequests) { + this.slowRequests = slowRequests; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureBlobStorageApplicationLogsConfig.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureBlobStorageApplicationLogsConfig.java new file mode 100644 index 00000000000..cf1525f2ebb --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureBlobStorageApplicationLogsConfig.java @@ -0,0 +1,99 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application logs azure blob storage configuration. + */ +public class AzureBlobStorageApplicationLogsConfig { + /** + * Log level. Possible values include: 'Off', 'Verbose', 'Information', + * 'Warning', 'Error'. + */ + @JsonProperty(value = "level") + private LogLevel level; + + /** + * SAS url to a azure blob container with read/write/list/delete + * permissions. + */ + @JsonProperty(value = "sasUrl") + private String sasUrl; + + /** + * Retention in days. + * Remove blobs older than X days. + * 0 or lower means no retention. + */ + @JsonProperty(value = "retentionInDays") + private Integer retentionInDays; + + /** + * Get the level value. + * + * @return the level value + */ + public LogLevel level() { + return this.level; + } + + /** + * Set the level value. + * + * @param level the level value to set + * @return the AzureBlobStorageApplicationLogsConfig object itself. + */ + public AzureBlobStorageApplicationLogsConfig withLevel(LogLevel level) { + this.level = level; + return this; + } + + /** + * Get the sasUrl value. + * + * @return the sasUrl value + */ + public String sasUrl() { + return this.sasUrl; + } + + /** + * Set the sasUrl value. + * + * @param sasUrl the sasUrl value to set + * @return the AzureBlobStorageApplicationLogsConfig object itself. + */ + public AzureBlobStorageApplicationLogsConfig withSasUrl(String sasUrl) { + this.sasUrl = sasUrl; + return this; + } + + /** + * Get the retentionInDays value. + * + * @return the retentionInDays value + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set the retentionInDays value. + * + * @param retentionInDays the retentionInDays value to set + * @return the AzureBlobStorageApplicationLogsConfig object itself. + */ + public AzureBlobStorageApplicationLogsConfig withRetentionInDays(Integer retentionInDays) { + this.retentionInDays = retentionInDays; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureBlobStorageHttpLogsConfig.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureBlobStorageHttpLogsConfig.java new file mode 100644 index 00000000000..a83d4242a3b --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureBlobStorageHttpLogsConfig.java @@ -0,0 +1,99 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Http logs to azure blob storage configuration. + */ +public class AzureBlobStorageHttpLogsConfig { + /** + * SAS url to a azure blob container with read/write/list/delete + * permissions. + */ + @JsonProperty(value = "sasUrl") + private String sasUrl; + + /** + * Retention in days. + * Remove blobs older than X days. + * 0 or lower means no retention. + */ + @JsonProperty(value = "retentionInDays") + private Integer retentionInDays; + + /** + * True if configuration is enabled, false if it is disabled and null if + * configuration is not set. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Get the sasUrl value. + * + * @return the sasUrl value + */ + public String sasUrl() { + return this.sasUrl; + } + + /** + * Set the sasUrl value. + * + * @param sasUrl the sasUrl value to set + * @return the AzureBlobStorageHttpLogsConfig object itself. + */ + public AzureBlobStorageHttpLogsConfig withSasUrl(String sasUrl) { + this.sasUrl = sasUrl; + return this; + } + + /** + * Get the retentionInDays value. + * + * @return the retentionInDays value + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set the retentionInDays value. + * + * @param retentionInDays the retentionInDays value to set + * @return the AzureBlobStorageHttpLogsConfig object itself. + */ + public AzureBlobStorageHttpLogsConfig withRetentionInDays(Integer retentionInDays) { + this.retentionInDays = retentionInDays; + return this; + } + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the AzureBlobStorageHttpLogsConfig object itself. + */ + public AzureBlobStorageHttpLogsConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureResourceType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureResourceType.java new file mode 100644 index 00000000000..5f478fc20d3 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureResourceType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AzureResourceType. + */ +public enum AzureResourceType { + /** Enum value Website. */ + WEBSITE("Website"), + + /** Enum value TrafficManager. */ + TRAFFIC_MANAGER("TrafficManager"); + + /** The actual serialized value for a AzureResourceType instance. */ + private String value; + + AzureResourceType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AzureResourceType instance. + * + * @param value the serialized value to parse. + * @return the parsed AzureResourceType object, or null if unable to parse. + */ + @JsonCreator + public static AzureResourceType fromString(String value) { + AzureResourceType[] items = AzureResourceType.values(); + for (AzureResourceType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureTableStorageApplicationLogsConfig.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureTableStorageApplicationLogsConfig.java new file mode 100644 index 00000000000..81dbd845cdd --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/AzureTableStorageApplicationLogsConfig.java @@ -0,0 +1,70 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application logs to Azure table storage configuration. + */ +public class AzureTableStorageApplicationLogsConfig { + /** + * Log level. Possible values include: 'Off', 'Verbose', 'Information', + * 'Warning', 'Error'. + */ + @JsonProperty(value = "level") + private LogLevel level; + + /** + * SAS URL to an Azure table with add/query/delete permissions. + */ + @JsonProperty(value = "sasUrl", required = true) + private String sasUrl; + + /** + * Get the level value. + * + * @return the level value + */ + public LogLevel level() { + return this.level; + } + + /** + * Set the level value. + * + * @param level the level value to set + * @return the AzureTableStorageApplicationLogsConfig object itself. + */ + public AzureTableStorageApplicationLogsConfig withLevel(LogLevel level) { + this.level = level; + return this; + } + + /** + * Get the sasUrl value. + * + * @return the sasUrl value + */ + public String sasUrl() { + return this.sasUrl; + } + + /** + * Set the sasUrl value. + * + * @param sasUrl the sasUrl value to set + * @return the AzureTableStorageApplicationLogsConfig object itself. + */ + public AzureTableStorageApplicationLogsConfig withSasUrl(String sasUrl) { + this.sasUrl = sasUrl; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BackupItemStatus.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BackupItemStatus.java new file mode 100644 index 00000000000..c08b556e236 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BackupItemStatus.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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for BackupItemStatus. + */ +public enum BackupItemStatus { + /** 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"), + + /** Enum value Skipped. */ + SKIPPED("Skipped"), + + /** Enum value PartiallySucceeded. */ + PARTIALLY_SUCCEEDED("PartiallySucceeded"), + + /** Enum value DeleteInProgress. */ + DELETE_IN_PROGRESS("DeleteInProgress"), + + /** Enum value DeleteFailed. */ + DELETE_FAILED("DeleteFailed"), + + /** Enum value Deleted. */ + DELETED("Deleted"); + + /** The actual serialized value for a BackupItemStatus instance. */ + private String value; + + BackupItemStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a BackupItemStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed BackupItemStatus object, or null if unable to parse. + */ + @JsonCreator + public static BackupItemStatus fromString(String value) { + BackupItemStatus[] items = BackupItemStatus.values(); + for (BackupItemStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BackupRestoreOperationType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BackupRestoreOperationType.java new file mode 100644 index 00000000000..0f29b12a169 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BackupRestoreOperationType.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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for BackupRestoreOperationType. + */ +public enum BackupRestoreOperationType { + /** Enum value Default. */ + DEFAULT("Default"), + + /** Enum value Clone. */ + CLONE("Clone"), + + /** Enum value Relocation. */ + RELOCATION("Relocation"), + + /** Enum value Snapshot. */ + SNAPSHOT("Snapshot"); + + /** The actual serialized value for a BackupRestoreOperationType instance. */ + private String value; + + BackupRestoreOperationType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a BackupRestoreOperationType instance. + * + * @param value the serialized value to parse. + * @return the parsed BackupRestoreOperationType object, or null if unable to parse. + */ + @JsonCreator + public static BackupRestoreOperationType fromString(String value) { + BackupRestoreOperationType[] items = BackupRestoreOperationType.values(); + for (BackupRestoreOperationType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BackupSchedule.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BackupSchedule.java new file mode 100644 index 00000000000..69f56afaced --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BackupSchedule.java @@ -0,0 +1,168 @@ +/** + * 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.web; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of a backup schedule. Describes how often should be the backup + * performed and what should be the retention policy. + */ +public class BackupSchedule { + /** + * How often the backup should be executed (e.g. for weekly backup, this + * should be set to 7 and FrequencyUnit should be set to Day). + */ + @JsonProperty(value = "frequencyInterval", required = true) + private int frequencyInterval; + + /** + * The unit of time for how often the backup should be executed (e.g. for + * weekly backup, this should be set to Day and FrequencyInterval should be + * set to 7). Possible values include: 'Day', 'Hour'. + */ + @JsonProperty(value = "frequencyUnit", required = true) + private FrequencyUnit frequencyUnit; + + /** + * True if the retention policy should always keep at least one backup in + * the storage account, regardless how old it is; false otherwise. + */ + @JsonProperty(value = "keepAtLeastOneBackup", required = true) + private boolean keepAtLeastOneBackup; + + /** + * After how many days backups should be deleted. + */ + @JsonProperty(value = "retentionPeriodInDays", required = true) + private int retentionPeriodInDays; + + /** + * When the schedule should start working. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * Last time when this schedule was triggered. + */ + @JsonProperty(value = "lastExecutionTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastExecutionTime; + + /** + * Get the frequencyInterval value. + * + * @return the frequencyInterval value + */ + public int frequencyInterval() { + return this.frequencyInterval; + } + + /** + * Set the frequencyInterval value. + * + * @param frequencyInterval the frequencyInterval value to set + * @return the BackupSchedule object itself. + */ + public BackupSchedule withFrequencyInterval(int frequencyInterval) { + this.frequencyInterval = frequencyInterval; + return this; + } + + /** + * Get the frequencyUnit value. + * + * @return the frequencyUnit value + */ + public FrequencyUnit frequencyUnit() { + return this.frequencyUnit; + } + + /** + * Set the frequencyUnit value. + * + * @param frequencyUnit the frequencyUnit value to set + * @return the BackupSchedule object itself. + */ + public BackupSchedule withFrequencyUnit(FrequencyUnit frequencyUnit) { + this.frequencyUnit = frequencyUnit; + return this; + } + + /** + * Get the keepAtLeastOneBackup value. + * + * @return the keepAtLeastOneBackup value + */ + public boolean keepAtLeastOneBackup() { + return this.keepAtLeastOneBackup; + } + + /** + * Set the keepAtLeastOneBackup value. + * + * @param keepAtLeastOneBackup the keepAtLeastOneBackup value to set + * @return the BackupSchedule object itself. + */ + public BackupSchedule withKeepAtLeastOneBackup(boolean keepAtLeastOneBackup) { + this.keepAtLeastOneBackup = keepAtLeastOneBackup; + return this; + } + + /** + * Get the retentionPeriodInDays value. + * + * @return the retentionPeriodInDays value + */ + public int retentionPeriodInDays() { + return this.retentionPeriodInDays; + } + + /** + * Set the retentionPeriodInDays value. + * + * @param retentionPeriodInDays the retentionPeriodInDays value to set + * @return the BackupSchedule object itself. + */ + public BackupSchedule withRetentionPeriodInDays(int retentionPeriodInDays) { + this.retentionPeriodInDays = retentionPeriodInDays; + 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 BackupSchedule object itself. + */ + public BackupSchedule withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the lastExecutionTime value. + * + * @return the lastExecutionTime value + */ + public DateTime lastExecutionTime() { + return this.lastExecutionTime; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BuiltInAuthenticationProvider.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BuiltInAuthenticationProvider.java new file mode 100644 index 00000000000..e25d78c2fec --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/BuiltInAuthenticationProvider.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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for BuiltInAuthenticationProvider. + */ +public enum BuiltInAuthenticationProvider { + /** Enum value AzureActiveDirectory. */ + AZURE_ACTIVE_DIRECTORY("AzureActiveDirectory"), + + /** Enum value Facebook. */ + FACEBOOK("Facebook"), + + /** Enum value Google. */ + GOOGLE("Google"), + + /** Enum value MicrosoftAccount. */ + MICROSOFT_ACCOUNT("MicrosoftAccount"), + + /** Enum value Twitter. */ + TWITTER("Twitter"); + + /** The actual serialized value for a BuiltInAuthenticationProvider instance. */ + private String value; + + BuiltInAuthenticationProvider(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a BuiltInAuthenticationProvider instance. + * + * @param value the serialized value to parse. + * @return the parsed BuiltInAuthenticationProvider object, or null if unable to parse. + */ + @JsonCreator + public static BuiltInAuthenticationProvider fromString(String value) { + BuiltInAuthenticationProvider[] items = BuiltInAuthenticationProvider.values(); + for (BuiltInAuthenticationProvider item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateDetails.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateDetails.java new file mode 100644 index 00000000000..ca58eb9eaef --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateDetails.java @@ -0,0 +1,153 @@ +/** + * 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.web; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SSL certificate details. + */ +public class CertificateDetails { + /** + * Certificate Version. + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private Integer version; + + /** + * Certificate Serial Number. + */ + @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /** + * Certificate Thumbprint. + */ + @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String thumbprint; + + /** + * Certificate Subject. + */ + @JsonProperty(value = "subject", access = JsonProperty.Access.WRITE_ONLY) + private String subject; + + /** + * Date Certificate is valid from. + */ + @JsonProperty(value = "notBefore", access = JsonProperty.Access.WRITE_ONLY) + private DateTime notBefore; + + /** + * Date Certificate is valid to. + */ + @JsonProperty(value = "notAfter", access = JsonProperty.Access.WRITE_ONLY) + private DateTime notAfter; + + /** + * Certificate Signature algorithm. + */ + @JsonProperty(value = "signatureAlgorithm", access = JsonProperty.Access.WRITE_ONLY) + private String signatureAlgorithm; + + /** + * Certificate Issuer. + */ + @JsonProperty(value = "issuer", access = JsonProperty.Access.WRITE_ONLY) + private String issuer; + + /** + * Raw certificate data. + */ + @JsonProperty(value = "rawData", access = JsonProperty.Access.WRITE_ONLY) + private String rawData; + + /** + * Get the version value. + * + * @return the version value + */ + public Integer version() { + return this.version; + } + + /** + * Get the serialNumber value. + * + * @return the serialNumber value + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the thumbprint value. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Get the subject value. + * + * @return the subject value + */ + public String subject() { + return this.subject; + } + + /** + * Get the notBefore value. + * + * @return the notBefore value + */ + public DateTime notBefore() { + return this.notBefore; + } + + /** + * Get the notAfter value. + * + * @return the notAfter value + */ + public DateTime notAfter() { + return this.notAfter; + } + + /** + * Get the signatureAlgorithm value. + * + * @return the signatureAlgorithm value + */ + public String signatureAlgorithm() { + return this.signatureAlgorithm; + } + + /** + * Get the issuer value. + * + * @return the issuer value + */ + public String issuer() { + return this.issuer; + } + + /** + * Get the rawData value. + * + * @return the rawData value + */ + public String rawData() { + return this.rawData; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateOrderActionType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateOrderActionType.java new file mode 100644 index 00000000000..354aa9a1241 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateOrderActionType.java @@ -0,0 +1,89 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CertificateOrderActionType. + */ +public enum CertificateOrderActionType { + /** Enum value CertificateIssued. */ + CERTIFICATE_ISSUED("CertificateIssued"), + + /** Enum value CertificateOrderCanceled. */ + CERTIFICATE_ORDER_CANCELED("CertificateOrderCanceled"), + + /** Enum value CertificateOrderCreated. */ + CERTIFICATE_ORDER_CREATED("CertificateOrderCreated"), + + /** Enum value CertificateRevoked. */ + CERTIFICATE_REVOKED("CertificateRevoked"), + + /** Enum value DomainValidationComplete. */ + DOMAIN_VALIDATION_COMPLETE("DomainValidationComplete"), + + /** Enum value FraudDetected. */ + FRAUD_DETECTED("FraudDetected"), + + /** Enum value OrgNameChange. */ + ORG_NAME_CHANGE("OrgNameChange"), + + /** Enum value OrgValidationComplete. */ + ORG_VALIDATION_COMPLETE("OrgValidationComplete"), + + /** Enum value SanDrop. */ + SAN_DROP("SanDrop"), + + /** Enum value FraudCleared. */ + FRAUD_CLEARED("FraudCleared"), + + /** Enum value CertificateExpired. */ + CERTIFICATE_EXPIRED("CertificateExpired"), + + /** Enum value CertificateExpirationWarning. */ + CERTIFICATE_EXPIRATION_WARNING("CertificateExpirationWarning"), + + /** Enum value FraudDocumentationRequired. */ + FRAUD_DOCUMENTATION_REQUIRED("FraudDocumentationRequired"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a CertificateOrderActionType instance. */ + private String value; + + CertificateOrderActionType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CertificateOrderActionType instance. + * + * @param value the serialized value to parse. + * @return the parsed CertificateOrderActionType object, or null if unable to parse. + */ + @JsonCreator + public static CertificateOrderActionType fromString(String value) { + CertificateOrderActionType[] items = CertificateOrderActionType.values(); + for (CertificateOrderActionType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateOrderStatus.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateOrderStatus.java new file mode 100644 index 00000000000..cc6f92e365c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateOrderStatus.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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CertificateOrderStatus. + */ +public enum CertificateOrderStatus { + /** Enum value Pendingissuance. */ + PENDINGISSUANCE("Pendingissuance"), + + /** Enum value Issued. */ + ISSUED("Issued"), + + /** Enum value Revoked. */ + REVOKED("Revoked"), + + /** Enum value Canceled. */ + CANCELED("Canceled"), + + /** Enum value Denied. */ + DENIED("Denied"), + + /** Enum value Pendingrevocation. */ + PENDINGREVOCATION("Pendingrevocation"), + + /** Enum value PendingRekey. */ + PENDING_REKEY("PendingRekey"), + + /** Enum value Unused. */ + UNUSED("Unused"), + + /** Enum value Expired. */ + EXPIRED("Expired"), + + /** Enum value NotSubmitted. */ + NOT_SUBMITTED("NotSubmitted"); + + /** The actual serialized value for a CertificateOrderStatus instance. */ + private String value; + + CertificateOrderStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CertificateOrderStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed CertificateOrderStatus object, or null if unable to parse. + */ + @JsonCreator + public static CertificateOrderStatus fromString(String value) { + CertificateOrderStatus[] items = CertificateOrderStatus.values(); + for (CertificateOrderStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateProductType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateProductType.java new file mode 100644 index 00000000000..9006d4d27b4 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CertificateProductType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CertificateProductType. + */ +public enum CertificateProductType { + /** Enum value StandardDomainValidatedSsl. */ + STANDARD_DOMAIN_VALIDATED_SSL("StandardDomainValidatedSsl"), + + /** Enum value StandardDomainValidatedWildCardSsl. */ + STANDARD_DOMAIN_VALIDATED_WILD_CARD_SSL("StandardDomainValidatedWildCardSsl"); + + /** The actual serialized value for a CertificateProductType instance. */ + private String value; + + CertificateProductType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CertificateProductType instance. + * + * @param value the serialized value to parse. + * @return the parsed CertificateProductType object, or null if unable to parse. + */ + @JsonCreator + public static CertificateProductType fromString(String value) { + CertificateProductType[] items = CertificateProductType.values(); + for (CertificateProductType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Channels.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Channels.java new file mode 100644 index 00000000000..6394265cc93 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Channels.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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for Channels. + */ +public enum Channels { + /** Enum value Notification. */ + NOTIFICATION("Notification"), + + /** Enum value Api. */ + API("Api"), + + /** Enum value Email. */ + EMAIL("Email"), + + /** Enum value Webhook. */ + WEBHOOK("Webhook"), + + /** Enum value All. */ + ALL("All"); + + /** The actual serialized value for a Channels instance. */ + private String value; + + Channels(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a Channels instance. + * + * @param value the serialized value to parse. + * @return the parsed Channels object, or null if unable to parse. + */ + @JsonCreator + public static Channels fromString(String value) { + Channels[] items = Channels.values(); + for (Channels item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CheckNameResourceTypes.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CheckNameResourceTypes.java new file mode 100644 index 00000000000..cd86d52625e --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CheckNameResourceTypes.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.web; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for CheckNameResourceTypes. + */ +public final class CheckNameResourceTypes extends ExpandableStringEnum { + /** Static value Site for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes SITE = fromString("Site"); + + /** Static value Slot for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes SLOT = fromString("Slot"); + + /** Static value HostingEnvironment for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes HOSTING_ENVIRONMENT = fromString("HostingEnvironment"); + + /** Static value PublishingUser for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes PUBLISHING_USER = fromString("PublishingUser"); + + /** Static value Microsoft.Web/sites for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_WEBSITES = fromString("Microsoft.Web/sites"); + + /** Static value Microsoft.Web/sites/slots for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_WEBSITESSLOTS = fromString("Microsoft.Web/sites/slots"); + + /** Static value Microsoft.Web/hostingEnvironments for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_WEBHOSTING_ENVIRONMENTS = fromString("Microsoft.Web/hostingEnvironments"); + + /** Static value Microsoft.Web/publishingUsers for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_WEBPUBLISHING_USERS = fromString("Microsoft.Web/publishingUsers"); + + /** + * Creates or finds a CheckNameResourceTypes from its string representation. + * @param name a name to look for + * @return the corresponding CheckNameResourceTypes + */ + @JsonCreator + public static CheckNameResourceTypes fromString(String name) { + return fromString(name, CheckNameResourceTypes.class); + } + + /** + * @return known CheckNameResourceTypes values + */ + public static Collection values() { + return values(CheckNameResourceTypes.class); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CloneAbilityResult.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CloneAbilityResult.java new file mode 100644 index 00000000000..8ef15363645 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CloneAbilityResult.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CloneAbilityResult. + */ +public enum CloneAbilityResult { + /** Enum value Cloneable. */ + CLONEABLE("Cloneable"), + + /** Enum value PartiallyCloneable. */ + PARTIALLY_CLONEABLE("PartiallyCloneable"), + + /** Enum value NotCloneable. */ + NOT_CLONEABLE("NotCloneable"); + + /** The actual serialized value for a CloneAbilityResult instance. */ + private String value; + + CloneAbilityResult(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CloneAbilityResult instance. + * + * @param value the serialized value to parse. + * @return the parsed CloneAbilityResult object, or null if unable to parse. + */ + @JsonCreator + public static CloneAbilityResult fromString(String value) { + CloneAbilityResult[] items = CloneAbilityResult.values(); + for (CloneAbilityResult item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CloningInfo.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CloningInfo.java new file mode 100644 index 00000000000..a2a7923a272 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CloningInfo.java @@ -0,0 +1,322 @@ +/** + * 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.web; + +import java.util.UUID; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information needed for cloning operation. + */ +public class CloningInfo { + /** + * Correlation ID of cloning operation. This ID ties multiple cloning + * operations + * together to use the same snapshot. + */ + @JsonProperty(value = "correlationId") + private UUID correlationId; + + /** + * <code>true</code> to overwrite destination app; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "overwrite") + private Boolean overwrite; + + /** + * <code>true</code> to clone custom hostnames from source app; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "cloneCustomHostNames") + private Boolean cloneCustomHostNames; + + /** + * <code>true</code> to clone source control from source app; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "cloneSourceControl") + private Boolean cloneSourceControl; + + /** + * ARM resource ID of the source app. App resource ID is of the form + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} + * for production slots and + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + * for other slots. + */ + @JsonProperty(value = "sourceWebAppId", required = true) + private String sourceWebAppId; + + /** + * App Service Environment. + */ + @JsonProperty(value = "hostingEnvironment") + private String hostingEnvironment; + + /** + * Application setting overrides for cloned app. If specified, these + * settings override the settings cloned + * from source app. Otherwise, application settings from source app are + * retained. + */ + @JsonProperty(value = "appSettingsOverrides") + private Map appSettingsOverrides; + + /** + * <code>true</code> to configure load balancing for source and + * destination app. + */ + @JsonProperty(value = "configureLoadBalancing") + private Boolean configureLoadBalancing; + + /** + * ARM resource ID of the Traffic Manager profile to use, if it exists. + * Traffic Manager resource ID is of the form + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}. + */ + @JsonProperty(value = "trafficManagerProfileId") + private String trafficManagerProfileId; + + /** + * Name of Traffic Manager profile to create. This is only needed if + * Traffic Manager profile does not already exist. + */ + @JsonProperty(value = "trafficManagerProfileName") + private String trafficManagerProfileName; + + /** + * <code>true</code> if quotas should be ignored; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "ignoreQuotas") + private Boolean ignoreQuotas; + + /** + * Get the correlationId value. + * + * @return the correlationId value + */ + public UUID correlationId() { + return this.correlationId; + } + + /** + * Set the correlationId value. + * + * @param correlationId the correlationId value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withCorrelationId(UUID correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the overwrite value. + * + * @return the overwrite value + */ + public Boolean overwrite() { + return this.overwrite; + } + + /** + * Set the overwrite value. + * + * @param overwrite the overwrite value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withOverwrite(Boolean overwrite) { + this.overwrite = overwrite; + return this; + } + + /** + * Get the cloneCustomHostNames value. + * + * @return the cloneCustomHostNames value + */ + public Boolean cloneCustomHostNames() { + return this.cloneCustomHostNames; + } + + /** + * Set the cloneCustomHostNames value. + * + * @param cloneCustomHostNames the cloneCustomHostNames value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withCloneCustomHostNames(Boolean cloneCustomHostNames) { + this.cloneCustomHostNames = cloneCustomHostNames; + return this; + } + + /** + * Get the cloneSourceControl value. + * + * @return the cloneSourceControl value + */ + public Boolean cloneSourceControl() { + return this.cloneSourceControl; + } + + /** + * Set the cloneSourceControl value. + * + * @param cloneSourceControl the cloneSourceControl value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withCloneSourceControl(Boolean cloneSourceControl) { + this.cloneSourceControl = cloneSourceControl; + return this; + } + + /** + * Get the sourceWebAppId value. + * + * @return the sourceWebAppId value + */ + public String sourceWebAppId() { + return this.sourceWebAppId; + } + + /** + * Set the sourceWebAppId value. + * + * @param sourceWebAppId the sourceWebAppId value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withSourceWebAppId(String sourceWebAppId) { + this.sourceWebAppId = sourceWebAppId; + 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 CloningInfo object itself. + */ + public CloningInfo withHostingEnvironment(String hostingEnvironment) { + this.hostingEnvironment = hostingEnvironment; + return this; + } + + /** + * Get the appSettingsOverrides value. + * + * @return the appSettingsOverrides value + */ + public Map appSettingsOverrides() { + return this.appSettingsOverrides; + } + + /** + * Set the appSettingsOverrides value. + * + * @param appSettingsOverrides the appSettingsOverrides value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withAppSettingsOverrides(Map appSettingsOverrides) { + this.appSettingsOverrides = appSettingsOverrides; + return this; + } + + /** + * Get the configureLoadBalancing value. + * + * @return the configureLoadBalancing value + */ + public Boolean configureLoadBalancing() { + return this.configureLoadBalancing; + } + + /** + * Set the configureLoadBalancing value. + * + * @param configureLoadBalancing the configureLoadBalancing value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withConfigureLoadBalancing(Boolean configureLoadBalancing) { + this.configureLoadBalancing = configureLoadBalancing; + return this; + } + + /** + * Get the trafficManagerProfileId value. + * + * @return the trafficManagerProfileId value + */ + public String trafficManagerProfileId() { + return this.trafficManagerProfileId; + } + + /** + * Set the trafficManagerProfileId value. + * + * @param trafficManagerProfileId the trafficManagerProfileId value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withTrafficManagerProfileId(String trafficManagerProfileId) { + this.trafficManagerProfileId = trafficManagerProfileId; + return this; + } + + /** + * Get the trafficManagerProfileName value. + * + * @return the trafficManagerProfileName value + */ + public String trafficManagerProfileName() { + return this.trafficManagerProfileName; + } + + /** + * Set the trafficManagerProfileName value. + * + * @param trafficManagerProfileName the trafficManagerProfileName value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withTrafficManagerProfileName(String trafficManagerProfileName) { + this.trafficManagerProfileName = trafficManagerProfileName; + return this; + } + + /** + * Get the ignoreQuotas value. + * + * @return the ignoreQuotas value + */ + public Boolean ignoreQuotas() { + return this.ignoreQuotas; + } + + /** + * Set the ignoreQuotas value. + * + * @param ignoreQuotas the ignoreQuotas value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withIgnoreQuotas(Boolean ignoreQuotas) { + this.ignoreQuotas = ignoreQuotas; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ComputeModeOptions.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ComputeModeOptions.java new file mode 100644 index 00000000000..95b19b7249f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ComputeModeOptions.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ComputeModeOptions. + */ +public enum ComputeModeOptions { + /** Enum value Shared. */ + SHARED("Shared"), + + /** Enum value Dedicated. */ + DEDICATED("Dedicated"), + + /** Enum value Dynamic. */ + DYNAMIC("Dynamic"); + + /** The actual serialized value for a ComputeModeOptions instance. */ + private String value; + + ComputeModeOptions(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ComputeModeOptions instance. + * + * @param value the serialized value to parse. + * @return the parsed ComputeModeOptions object, or null if unable to parse. + */ + @JsonCreator + public static ComputeModeOptions fromString(String value) { + ComputeModeOptions[] items = ComputeModeOptions.values(); + for (ComputeModeOptions item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ConnStringInfo.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ConnStringInfo.java new file mode 100644 index 00000000000..9d96fb1bd8c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ConnStringInfo.java @@ -0,0 +1,97 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database connection string information. + */ +public class ConnStringInfo { + /** + * Name of connection string. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Connection string value. + */ + @JsonProperty(value = "connectionString") + private String connectionString; + + /** + * Type of database. Possible values include: 'MySql', 'SQLServer', + * 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', + * 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL'. + */ + @JsonProperty(value = "type") + private ConnectionStringType 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 ConnectionStringType type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the ConnStringInfo object itself. + */ + public ConnStringInfo withType(ConnectionStringType type) { + this.type = type; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ConnStringValueTypePair.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ConnStringValueTypePair.java new file mode 100644 index 00000000000..1ae3ca4fc96 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ConnStringValueTypePair.java @@ -0,0 +1,71 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database connection string value to type pair. + */ +public class ConnStringValueTypePair { + /** + * Value of pair. + */ + @JsonProperty(value = "value", required = true) + private String value; + + /** + * Type of database. Possible values include: 'MySql', 'SQLServer', + * 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', + * 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL'. + */ + @JsonProperty(value = "type", required = true) + private ConnectionStringType type; + + /** + * 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 ConnStringValueTypePair object itself. + */ + public ConnStringValueTypePair withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public ConnectionStringType type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the ConnStringValueTypePair object itself. + */ + public ConnStringValueTypePair withType(ConnectionStringType type) { + this.type = type; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ConnectionStringType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ConnectionStringType.java new file mode 100644 index 00000000000..bf745f48aaf --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ConnectionStringType.java @@ -0,0 +1,80 @@ +/** + * 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.web; + +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"), + + /** Enum value PostgreSQL. */ + POSTGRE_SQL("PostgreSQL"); + + /** 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-web/src/main/java/com/microsoft/azure/management/web/Contact.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Contact.java new file mode 100644 index 00000000000..3364a091261 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Contact.java @@ -0,0 +1,254 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contact information for domain registration. If 'Domain Privacy' option is + * not selected then the contact information is made publicly available through + * the Whois + * directories as per ICANN requirements. + */ +public class Contact { + /** + * Mailing address. + */ + @JsonProperty(value = "addressMailing") + private Address addressMailing; + + /** + * Email address. + */ + @JsonProperty(value = "email", required = true) + private String email; + + /** + * Fax number. + */ + @JsonProperty(value = "fax") + private String fax; + + /** + * Job title. + */ + @JsonProperty(value = "jobTitle") + private String jobTitle; + + /** + * First name. + */ + @JsonProperty(value = "nameFirst", required = true) + private String nameFirst; + + /** + * Last name. + */ + @JsonProperty(value = "nameLast", required = true) + private String nameLast; + + /** + * Middle name. + */ + @JsonProperty(value = "nameMiddle") + private String nameMiddle; + + /** + * Organization contact belongs to. + */ + @JsonProperty(value = "organization") + private String organization; + + /** + * Phone number. + */ + @JsonProperty(value = "phone", required = true) + private String phone; + + /** + * Get the addressMailing value. + * + * @return the addressMailing value + */ + public Address addressMailing() { + return this.addressMailing; + } + + /** + * Set the addressMailing value. + * + * @param addressMailing the addressMailing value to set + * @return the Contact object itself. + */ + public Contact withAddressMailing(Address addressMailing) { + this.addressMailing = addressMailing; + return this; + } + + /** + * Get the email value. + * + * @return the email value + */ + public String email() { + return this.email; + } + + /** + * Set the email value. + * + * @param email the email value to set + * @return the Contact object itself. + */ + public Contact withEmail(String email) { + this.email = email; + return this; + } + + /** + * Get the fax value. + * + * @return the fax value + */ + public String fax() { + return this.fax; + } + + /** + * Set the fax value. + * + * @param fax the fax value to set + * @return the Contact object itself. + */ + public Contact withFax(String fax) { + this.fax = fax; + return this; + } + + /** + * Get the jobTitle value. + * + * @return the jobTitle value + */ + public String jobTitle() { + return this.jobTitle; + } + + /** + * Set the jobTitle value. + * + * @param jobTitle the jobTitle value to set + * @return the Contact object itself. + */ + public Contact withJobTitle(String jobTitle) { + this.jobTitle = jobTitle; + return this; + } + + /** + * Get the nameFirst value. + * + * @return the nameFirst value + */ + public String nameFirst() { + return this.nameFirst; + } + + /** + * Set the nameFirst value. + * + * @param nameFirst the nameFirst value to set + * @return the Contact object itself. + */ + public Contact withNameFirst(String nameFirst) { + this.nameFirst = nameFirst; + return this; + } + + /** + * Get the nameLast value. + * + * @return the nameLast value + */ + public String nameLast() { + return this.nameLast; + } + + /** + * Set the nameLast value. + * + * @param nameLast the nameLast value to set + * @return the Contact object itself. + */ + public Contact withNameLast(String nameLast) { + this.nameLast = nameLast; + return this; + } + + /** + * Get the nameMiddle value. + * + * @return the nameMiddle value + */ + public String nameMiddle() { + return this.nameMiddle; + } + + /** + * Set the nameMiddle value. + * + * @param nameMiddle the nameMiddle value to set + * @return the Contact object itself. + */ + public Contact withNameMiddle(String nameMiddle) { + this.nameMiddle = nameMiddle; + return this; + } + + /** + * Get the organization value. + * + * @return the organization value + */ + public String organization() { + return this.organization; + } + + /** + * Set the organization value. + * + * @param organization the organization value to set + * @return the Contact object itself. + */ + public Contact withOrganization(String organization) { + this.organization = organization; + return this; + } + + /** + * Get the phone value. + * + * @return the phone value + */ + public String phone() { + return this.phone; + } + + /** + * Set the phone value. + * + * @param phone the phone value to set + * @return the Contact object itself. + */ + public Contact withPhone(String phone) { + this.phone = phone; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ContinuousWebJobStatus.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ContinuousWebJobStatus.java new file mode 100644 index 00000000000..6b581ee04e1 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ContinuousWebJobStatus.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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ContinuousWebJobStatus. + */ +public enum ContinuousWebJobStatus { + /** Enum value Initializing. */ + INITIALIZING("Initializing"), + + /** Enum value Starting. */ + STARTING("Starting"), + + /** Enum value Running. */ + RUNNING("Running"), + + /** Enum value PendingRestart. */ + PENDING_RESTART("PendingRestart"), + + /** Enum value Stopped. */ + STOPPED("Stopped"); + + /** The actual serialized value for a ContinuousWebJobStatus instance. */ + private String value; + + ContinuousWebJobStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ContinuousWebJobStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed ContinuousWebJobStatus object, or null if unable to parse. + */ + @JsonCreator + public static ContinuousWebJobStatus fromString(String value) { + ContinuousWebJobStatus[] items = ContinuousWebJobStatus.values(); + for (ContinuousWebJobStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CorsSettings.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CorsSettings.java new file mode 100644 index 00000000000..bb25ffce935 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CorsSettings.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cross-Origin Resource Sharing (CORS) settings for the app. + */ +public class CorsSettings { + /** + * Gets or sets the list of origins that should be allowed to make + * cross-origin + * calls (for example: http://example.com:12345). Use "*" to allow all. + */ + @JsonProperty(value = "allowedOrigins") + private List allowedOrigins; + + /** + * Get the allowedOrigins value. + * + * @return the allowedOrigins value + */ + public List allowedOrigins() { + return this.allowedOrigins; + } + + /** + * Set the allowedOrigins value. + * + * @param allowedOrigins the allowedOrigins value to set + * @return the CorsSettings object itself. + */ + public CorsSettings withAllowedOrigins(List allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CsmOperationDescriptionProperties.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CsmOperationDescriptionProperties.java new file mode 100644 index 00000000000..3f62bb25695 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CsmOperationDescriptionProperties.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties available for a Microsoft.Web resource provider operation. + */ +public class CsmOperationDescriptionProperties { + /** + * The serviceSpecification property. + */ + @JsonProperty(value = "serviceSpecification") + private ServiceSpecification serviceSpecification; + + /** + * Get the serviceSpecification value. + * + * @return the serviceSpecification value + */ + public ServiceSpecification serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set the serviceSpecification value. + * + * @param serviceSpecification the serviceSpecification value to set + * @return the CsmOperationDescriptionProperties object itself. + */ + public CsmOperationDescriptionProperties withServiceSpecification(ServiceSpecification serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CsmOperationDisplay.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CsmOperationDisplay.java new file mode 100644 index 00000000000..70b26a7cd42 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CsmOperationDisplay.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Meta data about operation used for display in portal. + */ +public class CsmOperationDisplay { + /** + * The provider property. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * The resource property. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * The operation property. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * The description property. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the provider value. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider value. + * + * @param provider the provider value to set + * @return the CsmOperationDisplay object itself. + */ + public CsmOperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the resource value. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource value. + * + * @param resource the resource value to set + * @return the CsmOperationDisplay object itself. + */ + public CsmOperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the operation value. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set the operation value. + * + * @param operation the operation value to set + * @return the CsmOperationDisplay object itself. + */ + public CsmOperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the CsmOperationDisplay object itself. + */ + public CsmOperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CsmPublishingProfileOptions.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CsmPublishingProfileOptions.java new file mode 100644 index 00000000000..829e4fa8654 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CsmPublishingProfileOptions.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Publishing options for requested profile. + */ +public class CsmPublishingProfileOptions { + /** + * Name of the format. Valid values are: + * FileZilla3 + * WebDeploy -- default + * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp'. + */ + @JsonProperty(value = "format") + private PublishingProfileFormat format; + + /** + * Get the format value. + * + * @return the format value + */ + public PublishingProfileFormat format() { + return this.format; + } + + /** + * Set the format value. + * + * @param format the format value to set + * @return the CsmPublishingProfileOptions object itself. + */ + public CsmPublishingProfileOptions withFormat(PublishingProfileFormat format) { + this.format = format; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CustomHostNameDnsRecordType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CustomHostNameDnsRecordType.java new file mode 100644 index 00000000000..5d5cb2d736f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/CustomHostNameDnsRecordType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CustomHostNameDnsRecordType. + */ +public enum CustomHostNameDnsRecordType { + /** Enum value CName. */ + CNAME("CName"), + + /** Enum value A. */ + A("A"); + + /** The actual serialized value for a CustomHostNameDnsRecordType instance. */ + private String value; + + CustomHostNameDnsRecordType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CustomHostNameDnsRecordType instance. + * + * @param value the serialized value to parse. + * @return the parsed CustomHostNameDnsRecordType object, or null if unable to parse. + */ + @JsonCreator + public static CustomHostNameDnsRecordType fromString(String value) { + CustomHostNameDnsRecordType[] items = CustomHostNameDnsRecordType.values(); + for (CustomHostNameDnsRecordType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DataSource.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DataSource.java new file mode 100644 index 00000000000..54d405f9efe --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DataSource.java @@ -0,0 +1,70 @@ +/** + * 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.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class representing data source used by the detectors. + */ +public class DataSource { + /** + * Instrunctions if any for the data source. + */ + @JsonProperty(value = "instructions") + private List instructions; + + /** + * Datasource Uri Links. + */ + @JsonProperty(value = "dataSourceUri") + private List dataSourceUri; + + /** + * Get the instructions value. + * + * @return the instructions value + */ + public List instructions() { + return this.instructions; + } + + /** + * Set the instructions value. + * + * @param instructions the instructions value to set + * @return the DataSource object itself. + */ + public DataSource withInstructions(List instructions) { + this.instructions = instructions; + return this; + } + + /** + * Get the dataSourceUri value. + * + * @return the dataSourceUri value + */ + public List dataSourceUri() { + return this.dataSourceUri; + } + + /** + * Set the dataSourceUri value. + * + * @param dataSourceUri the dataSourceUri value to set + * @return the DataSource object itself. + */ + public DataSource withDataSourceUri(List dataSourceUri) { + this.dataSourceUri = dataSourceUri; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DatabaseBackupSetting.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DatabaseBackupSetting.java new file mode 100644 index 00000000000..55abc7e4e8e --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DatabaseBackupSetting.java @@ -0,0 +1,126 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database backup settings. + */ +public class DatabaseBackupSetting { + /** + * Database type (e.g. SqlAzure / MySql). Possible values include: + * 'SqlAzure', 'MySql', 'LocalMySql', 'PostgreSql'. + */ + @JsonProperty(value = "databaseType", required = true) + private DatabaseType databaseType; + + /** + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Contains a connection string name that is linked to the + * SiteConfig.ConnectionStrings. + * This is used during restore with overwrite connection strings options. + */ + @JsonProperty(value = "connectionStringName") + private String connectionStringName; + + /** + * Contains a connection string to a database which is being backed up or + * restored. If the restore should happen to a new database, the database + * name inside is the new one. + */ + @JsonProperty(value = "connectionString") + private String connectionString; + + /** + * Get the databaseType value. + * + * @return the databaseType value + */ + public DatabaseType databaseType() { + return this.databaseType; + } + + /** + * Set the databaseType value. + * + * @param databaseType the databaseType value to set + * @return the DatabaseBackupSetting object itself. + */ + public DatabaseBackupSetting withDatabaseType(DatabaseType databaseType) { + this.databaseType = databaseType; + 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 DatabaseBackupSetting object itself. + */ + public DatabaseBackupSetting withName(String name) { + this.name = name; + return this; + } + + /** + * Get the connectionStringName value. + * + * @return the connectionStringName value + */ + public String connectionStringName() { + return this.connectionStringName; + } + + /** + * Set the connectionStringName value. + * + * @param connectionStringName the connectionStringName value to set + * @return the DatabaseBackupSetting object itself. + */ + public DatabaseBackupSetting withConnectionStringName(String connectionStringName) { + this.connectionStringName = connectionStringName; + 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 DatabaseBackupSetting object itself. + */ + public DatabaseBackupSetting withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DatabaseType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DatabaseType.java new file mode 100644 index 00000000000..2a707cd1c15 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DatabaseType.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.web; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabaseType. + */ +public final class DatabaseType extends ExpandableStringEnum { + /** Static value SqlAzure for DatabaseType. */ + public static final DatabaseType SQL_AZURE = fromString("SqlAzure"); + + /** Static value MySql for DatabaseType. */ + public static final DatabaseType MY_SQL = fromString("MySql"); + + /** Static value LocalMySql for DatabaseType. */ + public static final DatabaseType LOCAL_MY_SQL = fromString("LocalMySql"); + + /** Static value PostgreSql for DatabaseType. */ + public static final DatabaseType POSTGRE_SQL = fromString("PostgreSql"); + + /** + * Creates or finds a DatabaseType from its string representation. + * @param name a name to look for + * @return the corresponding DatabaseType + */ + @JsonCreator + public static DatabaseType fromString(String name) { + return fromString(name, DatabaseType.class); + } + + /** + * @return known DatabaseType values + */ + public static Collection values() { + return values(DatabaseType.class); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DetectorAbnormalTimePeriod.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DetectorAbnormalTimePeriod.java new file mode 100644 index 00000000000..cea65cef008 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DetectorAbnormalTimePeriod.java @@ -0,0 +1,229 @@ +/** + * 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.web; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class representing Abnormal Time Period detected. + */ +public class DetectorAbnormalTimePeriod { + /** + * Start time of the corelated event. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * End time of the corelated event. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * Message describing the event. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Represents the name of the Detector. + */ + @JsonProperty(value = "source") + private String source; + + /** + * Represents the rank of the Detector. + */ + @JsonProperty(value = "priority") + private Double priority; + + /** + * Downtime metadata. + */ + @JsonProperty(value = "metaData") + private List> metaData; + + /** + * Represents the type of the Detector. Possible values include: + * 'ServiceIncident', 'AppDeployment', 'AppCrash', 'RuntimeIssueDetected', + * 'AseDeployment', 'UserIssue', 'PlatformIssue', 'Other'. + */ + @JsonProperty(value = "type") + private IssueType type; + + /** + * List of proposed solutions. + */ + @JsonProperty(value = "solutions") + private List solutions; + + /** + * 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 DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod 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 DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withEndTime(DateTime endTime) { + this.endTime = endTime; + 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 DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the source value. + * + * @return the source value + */ + public String source() { + return this.source; + } + + /** + * Set the source value. + * + * @param source the source value to set + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the priority value. + * + * @return the priority value + */ + public Double priority() { + return this.priority; + } + + /** + * Set the priority value. + * + * @param priority the priority value to set + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withPriority(Double priority) { + this.priority = priority; + return this; + } + + /** + * 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 DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withMetaData(List> metaData) { + this.metaData = metaData; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public IssueType type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withType(IssueType type) { + this.type = type; + return this; + } + + /** + * Get the solutions value. + * + * @return the solutions value + */ + public List solutions() { + return this.solutions; + } + + /** + * Set the solutions value. + * + * @param solutions the solutions value to set + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withSolutions(List solutions) { + this.solutions = solutions; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DiagnosticMetricSample.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DiagnosticMetricSample.java new file mode 100644 index 00000000000..95aefadd56c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DiagnosticMetricSample.java @@ -0,0 +1,180 @@ +/** + * 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.web; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class representing Diagnostic Metric. + */ +public class DiagnosticMetricSample { + /** + * Time at which metric is measured. + */ + @JsonProperty(value = "timestamp") + private DateTime timestamp; + + /** + * Role Instance. Null if this counter is not per instance + * This is returned and should be whichever instance name we desire to be + * returned + * i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0) + * where RDWORKERNAME is Machine name below and RoleInstance name in + * parenthesis. + */ + @JsonProperty(value = "roleInstance") + private String roleInstance; + + /** + * Total value of the metric. If multiple measurements are made this will + * have sum of all. + */ + @JsonProperty(value = "total") + private Double total; + + /** + * Maximum of the metric sampled during the time period. + */ + @JsonProperty(value = "maximum") + private Double maximum; + + /** + * Minimum of the metric sampled during the time period. + */ + @JsonProperty(value = "minimum") + private Double minimum; + + /** + * Whether the values are aggregates across all workers or not. + */ + @JsonProperty(value = "isAggregated") + private Boolean isAggregated; + + /** + * Get the timestamp value. + * + * @return the timestamp value + */ + public DateTime timestamp() { + return this.timestamp; + } + + /** + * Set the timestamp value. + * + * @param timestamp the timestamp value to set + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withTimestamp(DateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the roleInstance value. + * + * @return the roleInstance value + */ + public String roleInstance() { + return this.roleInstance; + } + + /** + * Set the roleInstance value. + * + * @param roleInstance the roleInstance value to set + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withRoleInstance(String roleInstance) { + this.roleInstance = roleInstance; + return this; + } + + /** + * Get the total value. + * + * @return the total value + */ + public Double total() { + return this.total; + } + + /** + * Set the total value. + * + * @param total the total value to set + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withTotal(Double total) { + this.total = total; + return this; + } + + /** + * Get the maximum value. + * + * @return the maximum value + */ + public Double maximum() { + return this.maximum; + } + + /** + * Set the maximum value. + * + * @param maximum the maximum value to set + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withMaximum(Double maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get the minimum value. + * + * @return the minimum value + */ + public Double minimum() { + return this.minimum; + } + + /** + * Set the minimum value. + * + * @param minimum the minimum value to set + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withMinimum(Double minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get the isAggregated value. + * + * @return the isAggregated value + */ + public Boolean isAggregated() { + return this.isAggregated; + } + + /** + * Set the isAggregated value. + * + * @param isAggregated the isAggregated value to set + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withIsAggregated(Boolean isAggregated) { + this.isAggregated = isAggregated; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DiagnosticMetricSet.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DiagnosticMetricSet.java new file mode 100644 index 00000000000..fbdf1f11697 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DiagnosticMetricSet.java @@ -0,0 +1,177 @@ +/** + * 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.web; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class representing Diagnostic Metric information. + */ +public class DiagnosticMetricSet { + /** + * Name of the metric. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Metric's unit. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Start time of the period. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * End time of the period. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * Presented time grain. Supported grains at the moment are PT1M, PT1H, + * P1D. + */ + @JsonProperty(value = "timeGrain") + private String timeGrain; + + /** + * Collection of metric values for the selected period based on the + * {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}. + */ + @JsonProperty(value = "values") + 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 DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withName(String name) { + this.name = name; + return this; + } + + /** + * Get the unit value. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit value. + * + * @param unit the unit value to set + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withUnit(String unit) { + this.unit = unit; + 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 DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet 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 DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet 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 DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet 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 DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withValues(List values) { + this.values = values; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Dimension.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Dimension.java new file mode 100644 index 00000000000..975e01e6b71 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Dimension.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dimension of a resource metric. For e.g. instance specific HTTP requests for + * a web app, + * where instance name is dimension of the metric HTTP request. + */ +public class Dimension { + /** + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The displayName property. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The internalName property. + */ + @JsonProperty(value = "internalName") + private String internalName; + + /** + * The toBeExportedForShoebox property. + */ + @JsonProperty(value = "toBeExportedForShoebox") + private Boolean toBeExportedForShoebox; + + /** + * 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 Dimension object itself. + */ + public Dimension withName(String name) { + this.name = name; + return this; + } + + /** + * Get the displayName value. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName value. + * + * @param displayName the displayName value to set + * @return the Dimension object itself. + */ + public Dimension withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the internalName value. + * + * @return the internalName value + */ + public String internalName() { + return this.internalName; + } + + /** + * Set the internalName value. + * + * @param internalName the internalName value to set + * @return the Dimension object itself. + */ + public Dimension withInternalName(String internalName) { + this.internalName = internalName; + return this; + } + + /** + * Get the toBeExportedForShoebox value. + * + * @return the toBeExportedForShoebox value + */ + public Boolean toBeExportedForShoebox() { + return this.toBeExportedForShoebox; + } + + /** + * Set the toBeExportedForShoebox value. + * + * @param toBeExportedForShoebox the toBeExportedForShoebox value to set + * @return the Dimension object itself. + */ + public Dimension withToBeExportedForShoebox(Boolean toBeExportedForShoebox) { + this.toBeExportedForShoebox = toBeExportedForShoebox; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DnsType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DnsType.java new file mode 100644 index 00000000000..be90aef2ca1 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DnsType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DnsType. + */ +public enum DnsType { + /** Enum value AzureDns. */ + AZURE_DNS("AzureDns"), + + /** Enum value DefaultDomainRegistrarDns. */ + DEFAULT_DOMAIN_REGISTRAR_DNS("DefaultDomainRegistrarDns"); + + /** The actual serialized value for a DnsType instance. */ + private String value; + + DnsType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DnsType instance. + * + * @param value the serialized value to parse. + * @return the parsed DnsType object, or null if unable to parse. + */ + @JsonCreator + public static DnsType fromString(String value) { + DnsType[] items = DnsType.values(); + for (DnsType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DnsVerificationTestResult.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DnsVerificationTestResult.java new file mode 100644 index 00000000000..6dec6e98bdc --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DnsVerificationTestResult.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DnsVerificationTestResult. + */ +public enum DnsVerificationTestResult { + /** Enum value Passed. */ + PASSED("Passed"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Skipped. */ + SKIPPED("Skipped"); + + /** The actual serialized value for a DnsVerificationTestResult instance. */ + private String value; + + DnsVerificationTestResult(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DnsVerificationTestResult instance. + * + * @param value the serialized value to parse. + * @return the parsed DnsVerificationTestResult object, or null if unable to parse. + */ + @JsonCreator + public static DnsVerificationTestResult fromString(String value) { + DnsVerificationTestResult[] items = DnsVerificationTestResult.values(); + for (DnsVerificationTestResult item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DomainPurchaseConsent.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DomainPurchaseConsent.java new file mode 100644 index 00000000000..4bc13d18e86 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DomainPurchaseConsent.java @@ -0,0 +1,100 @@ +/** + * 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.web; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Domain purchase consent object, representing acceptance of applicable legal + * agreements. + */ +public class DomainPurchaseConsent { + /** + * List of applicable legal agreement keys. This list can be retrieved + * using ListLegalAgreements API under + * <code>TopLevelDomain</code> resource. + */ + @JsonProperty(value = "agreementKeys") + private List agreementKeys; + + /** + * Client IP address. + */ + @JsonProperty(value = "agreedBy") + private String agreedBy; + + /** + * Timestamp when the agreements were accepted. + */ + @JsonProperty(value = "agreedAt") + private DateTime agreedAt; + + /** + * Get the agreementKeys value. + * + * @return the agreementKeys value + */ + public List agreementKeys() { + return this.agreementKeys; + } + + /** + * Set the agreementKeys value. + * + * @param agreementKeys the agreementKeys value to set + * @return the DomainPurchaseConsent object itself. + */ + public DomainPurchaseConsent withAgreementKeys(List agreementKeys) { + this.agreementKeys = agreementKeys; + return this; + } + + /** + * Get the agreedBy value. + * + * @return the agreedBy value + */ + public String agreedBy() { + return this.agreedBy; + } + + /** + * Set the agreedBy value. + * + * @param agreedBy the agreedBy value to set + * @return the DomainPurchaseConsent object itself. + */ + public DomainPurchaseConsent withAgreedBy(String agreedBy) { + this.agreedBy = agreedBy; + return this; + } + + /** + * Get the agreedAt value. + * + * @return the agreedAt value + */ + public DateTime agreedAt() { + return this.agreedAt; + } + + /** + * Set the agreedAt value. + * + * @param agreedAt the agreedAt value to set + * @return the DomainPurchaseConsent object itself. + */ + public DomainPurchaseConsent withAgreedAt(DateTime agreedAt) { + this.agreedAt = agreedAt; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DomainStatus.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DomainStatus.java new file mode 100644 index 00000000000..79a7ef936d4 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DomainStatus.java @@ -0,0 +1,110 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DomainStatus. + */ +public enum DomainStatus { + /** Enum value Active. */ + ACTIVE("Active"), + + /** Enum value Awaiting. */ + AWAITING("Awaiting"), + + /** Enum value Cancelled. */ + CANCELLED("Cancelled"), + + /** Enum value Confiscated. */ + CONFISCATED("Confiscated"), + + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value Excluded. */ + EXCLUDED("Excluded"), + + /** Enum value Expired. */ + EXPIRED("Expired"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Held. */ + HELD("Held"), + + /** Enum value Locked. */ + LOCKED("Locked"), + + /** Enum value Parked. */ + PARKED("Parked"), + + /** Enum value Pending. */ + PENDING("Pending"), + + /** Enum value Reserved. */ + RESERVED("Reserved"), + + /** Enum value Reverted. */ + REVERTED("Reverted"), + + /** Enum value Suspended. */ + SUSPENDED("Suspended"), + + /** Enum value Transferred. */ + TRANSFERRED("Transferred"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"), + + /** Enum value Unlocked. */ + UNLOCKED("Unlocked"), + + /** Enum value Unparked. */ + UNPARKED("Unparked"), + + /** Enum value Updated. */ + UPDATED("Updated"), + + /** Enum value JsonConverterFailed. */ + JSON_CONVERTER_FAILED("JsonConverterFailed"); + + /** The actual serialized value for a DomainStatus instance. */ + private String value; + + DomainStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DomainStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed DomainStatus object, or null if unable to parse. + */ + @JsonCreator + public static DomainStatus fromString(String value) { + DomainStatus[] items = DomainStatus.values(); + for (DomainStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DomainType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DomainType.java new file mode 100644 index 00000000000..21d7ef74a2b --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/DomainType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DomainType. + */ +public enum DomainType { + /** Enum value Regular. */ + REGULAR("Regular"), + + /** Enum value SoftDeleted. */ + SOFT_DELETED("SoftDeleted"); + + /** The actual serialized value for a DomainType instance. */ + private String value; + + DomainType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DomainType instance. + * + * @param value the serialized value to parse. + * @return the parsed DomainType object, or null if unable to parse. + */ + @JsonCreator + public static DomainType fromString(String value) { + DomainType[] items = DomainType.values(); + for (DomainType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/EnabledConfig.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/EnabledConfig.java new file mode 100644 index 00000000000..8923839ece2 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/EnabledConfig.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Enabled configuration. + */ +public class EnabledConfig { + /** + * True if configuration is enabled, false if it is disabled and null if + * configuration is not set. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the EnabledConfig object itself. + */ + public EnabledConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ErrorEntity.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ErrorEntity.java new file mode 100644 index 00000000000..4f5cf4a72c5 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ErrorEntity.java @@ -0,0 +1,174 @@ +/** + * 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.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Body of the error response returned from the API. + */ +public class ErrorEntity { + /** + * Type of error. + */ + @JsonProperty(value = "extendedCode") + private String extendedCode; + + /** + * Message template. + */ + @JsonProperty(value = "messageTemplate") + private String messageTemplate; + + /** + * Parameters for the template. + */ + @JsonProperty(value = "parameters") + private List parameters; + + /** + * Inner errors. + */ + @JsonProperty(value = "innerErrors") + private List innerErrors; + + /** + * Basic error code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Any details of the error. + */ + @JsonProperty(value = "message") + private String message; + + /** + * 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; + } + + /** + * 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; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ErrorResponse.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ErrorResponse.java new file mode 100644 index 00000000000..1473578e527 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ErrorResponse.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error Response. + */ +public class ErrorResponse { + /** + * Error code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Error message indicating why the operation failed. + */ + @JsonProperty(value = "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 ErrorResponse object itself. + */ + public ErrorResponse 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 ErrorResponse object itself. + */ + public ErrorResponse withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ErrorResponseException.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ErrorResponseException.java new file mode 100644 index 00000000000..029048c0bc5 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ErrorResponseException.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ErrorResponse information. + */ +public class ErrorResponseException extends RestException { + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { + super(message, response, body); + } + + @Override + public ErrorResponse body() { + return (ErrorResponse) super.body(); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Experiments.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Experiments.java new file mode 100644 index 00000000000..8e4248f8b50 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Experiments.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Routing rules in production experiments. + */ +public class Experiments { + /** + * List of ramp-up rules. + */ + @JsonProperty(value = "rampUpRules") + private List rampUpRules; + + /** + * Get the rampUpRules value. + * + * @return the rampUpRules value + */ + public List rampUpRules() { + return this.rampUpRules; + } + + /** + * Set the rampUpRules value. + * + * @param rampUpRules the rampUpRules value to set + * @return the Experiments object itself. + */ + public Experiments withRampUpRules(List rampUpRules) { + this.rampUpRules = rampUpRules; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/FileSystemApplicationLogsConfig.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/FileSystemApplicationLogsConfig.java new file mode 100644 index 00000000000..756764c08bc --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/FileSystemApplicationLogsConfig.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application logs to file system configuration. + */ +public class FileSystemApplicationLogsConfig { + /** + * Log level. Possible values include: 'Off', 'Verbose', 'Information', + * 'Warning', 'Error'. + */ + @JsonProperty(value = "level") + private LogLevel level; + + /** + * Get the level value. + * + * @return the level value + */ + public LogLevel level() { + return this.level; + } + + /** + * Set the level value. + * + * @param level the level value to set + * @return the FileSystemApplicationLogsConfig object itself. + */ + public FileSystemApplicationLogsConfig withLevel(LogLevel level) { + this.level = level; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/FileSystemHttpLogsConfig.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/FileSystemHttpLogsConfig.java new file mode 100644 index 00000000000..921b826081f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/FileSystemHttpLogsConfig.java @@ -0,0 +1,100 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Http logs to file system configuration. + */ +public class FileSystemHttpLogsConfig { + /** + * Maximum size in megabytes that http log files can use. + * When reached old log files will be removed to make space for new ones. + * Value can range between 25 and 100. + */ + @JsonProperty(value = "retentionInMb") + private Integer retentionInMb; + + /** + * Retention in days. + * Remove files older than X days. + * 0 or lower means no retention. + */ + @JsonProperty(value = "retentionInDays") + private Integer retentionInDays; + + /** + * True if configuration is enabled, false if it is disabled and null if + * configuration is not set. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Get the retentionInMb value. + * + * @return the retentionInMb value + */ + public Integer retentionInMb() { + return this.retentionInMb; + } + + /** + * Set the retentionInMb value. + * + * @param retentionInMb the retentionInMb value to set + * @return the FileSystemHttpLogsConfig object itself. + */ + public FileSystemHttpLogsConfig withRetentionInMb(Integer retentionInMb) { + this.retentionInMb = retentionInMb; + return this; + } + + /** + * Get the retentionInDays value. + * + * @return the retentionInDays value + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set the retentionInDays value. + * + * @param retentionInDays the retentionInDays value to set + * @return the FileSystemHttpLogsConfig object itself. + */ + public FileSystemHttpLogsConfig withRetentionInDays(Integer retentionInDays) { + this.retentionInDays = retentionInDays; + return this; + } + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the FileSystemHttpLogsConfig object itself. + */ + public FileSystemHttpLogsConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/FrequencyUnit.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/FrequencyUnit.java new file mode 100644 index 00000000000..4e4d17560e8 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/FrequencyUnit.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for FrequencyUnit. + */ +public enum FrequencyUnit { + /** Enum value Day. */ + DAY("Day"), + + /** Enum value Hour. */ + HOUR("Hour"); + + /** The actual serialized value for a FrequencyUnit instance. */ + private String value; + + FrequencyUnit(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a FrequencyUnit instance. + * + * @param value the serialized value to parse. + * @return the parsed FrequencyUnit object, or null if unable to parse. + */ + @JsonCreator + public static FrequencyUnit fromString(String value) { + FrequencyUnit[] items = FrequencyUnit.values(); + for (FrequencyUnit item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/GlobalCsmSkuDescription.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/GlobalCsmSkuDescription.java new file mode 100644 index 00000000000..dc14e564fe7 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/GlobalCsmSkuDescription.java @@ -0,0 +1,201 @@ +/** + * 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.web; + +import java.util.List; +import com.microsoft.azure.management.web.implementation.CapabilityInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Global SKU Description. + */ +public class GlobalCsmSkuDescription { + /** + * Name of the resource SKU. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Service Tier of the resource SKU. + */ + @JsonProperty(value = "tier") + private String tier; + + /** + * Size specifier of the resource SKU. + */ + @JsonProperty(value = "size") + private String size; + + /** + * Family code of the resource SKU. + */ + @JsonProperty(value = "family") + private String family; + + /** + * Min, max, and default scale values of the SKU. + */ + @JsonProperty(value = "capacity") + private SkuCapacity capacity; + + /** + * Locations of the SKU. + */ + @JsonProperty(value = "locations") + private List locations; + + /** + * Capabilities of the SKU, e.g., is traffic manager enabled?. + */ + @JsonProperty(value = "capabilities") + private List capabilities; + + /** + * 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 GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier value. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier value. + * + * @param tier the tier value to set + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get the size value. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Set the size value. + * + * @param size the size value to set + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the family value. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set the family value. + * + * @param family the family value to set + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the capacity value. + * + * @return the capacity value + */ + public SkuCapacity capacity() { + return this.capacity; + } + + /** + * Set the capacity value. + * + * @param capacity the capacity value to set + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withCapacity(SkuCapacity capacity) { + this.capacity = capacity; + 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 GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription 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 GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withCapabilities(List capabilities) { + this.capabilities = capabilities; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HandlerMapping.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HandlerMapping.java new file mode 100644 index 00000000000..7e9d3967dc3 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HandlerMapping.java @@ -0,0 +1,99 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The IIS handler mappings used to define which handler processes HTTP + * requests with certain extension. + * For example, it is used to configure php-cgi.exe process to handle all HTTP + * requests with *.php extension. + */ +public class HandlerMapping { + /** + * Requests with this extension will be handled using the specified FastCGI + * application. + */ + @JsonProperty(value = "extension") + private String extension; + + /** + * The absolute path to the FastCGI application. + */ + @JsonProperty(value = "scriptProcessor") + private String scriptProcessor; + + /** + * Command-line arguments to be passed to the script processor. + */ + @JsonProperty(value = "arguments") + private String arguments; + + /** + * Get the extension value. + * + * @return the extension value + */ + public String extension() { + return this.extension; + } + + /** + * Set the extension value. + * + * @param extension the extension value to set + * @return the HandlerMapping object itself. + */ + public HandlerMapping withExtension(String extension) { + this.extension = extension; + return this; + } + + /** + * Get the scriptProcessor value. + * + * @return the scriptProcessor value + */ + public String scriptProcessor() { + return this.scriptProcessor; + } + + /** + * Set the scriptProcessor value. + * + * @param scriptProcessor the scriptProcessor value to set + * @return the HandlerMapping object itself. + */ + public HandlerMapping withScriptProcessor(String scriptProcessor) { + this.scriptProcessor = scriptProcessor; + return this; + } + + /** + * Get the arguments value. + * + * @return the arguments value + */ + public String arguments() { + return this.arguments; + } + + /** + * Set the arguments value. + * + * @param arguments the arguments value to set + * @return the HandlerMapping object itself. + */ + public HandlerMapping withArguments(String arguments) { + this.arguments = arguments; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostName.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostName.java new file mode 100644 index 00000000000..a966476e7be --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostName.java @@ -0,0 +1,178 @@ +/** + * 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.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of a hostname derived from a domain. + */ +public class HostName { + /** + * Name of the hostname. + */ + @JsonProperty(value = "name") + private String name; + + /** + * List of apps the hostname is assigned to. This list will have more than + * one app only if the hostname is pointing to a Traffic Manager. + */ + @JsonProperty(value = "siteNames") + private List siteNames; + + /** + * Name of the Azure resource the hostname is assigned to. If it is + * assigned to a Traffic Manager then it will be the Traffic Manager name + * otherwise it will be the app name. + */ + @JsonProperty(value = "azureResourceName") + private String azureResourceName; + + /** + * Type of the Azure resource the hostname is assigned to. Possible values + * include: 'Website', 'TrafficManager'. + */ + @JsonProperty(value = "azureResourceType") + private AzureResourceType azureResourceType; + + /** + * Type of the DNS record. Possible values include: 'CName', 'A'. + */ + @JsonProperty(value = "customHostNameDnsRecordType") + private CustomHostNameDnsRecordType customHostNameDnsRecordType; + + /** + * Type of the hostname. Possible values include: 'Verified', 'Managed'. + */ + @JsonProperty(value = "hostNameType") + private HostNameType hostNameType; + + /** + * 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 HostName object itself. + */ + public HostName withName(String name) { + this.name = name; + return this; + } + + /** + * Get the siteNames value. + * + * @return the siteNames value + */ + public List siteNames() { + return this.siteNames; + } + + /** + * Set the siteNames value. + * + * @param siteNames the siteNames value to set + * @return the HostName object itself. + */ + public HostName withSiteNames(List siteNames) { + this.siteNames = siteNames; + return this; + } + + /** + * Get the azureResourceName value. + * + * @return the azureResourceName value + */ + public String azureResourceName() { + return this.azureResourceName; + } + + /** + * Set the azureResourceName value. + * + * @param azureResourceName the azureResourceName value to set + * @return the HostName object itself. + */ + public HostName withAzureResourceName(String azureResourceName) { + this.azureResourceName = azureResourceName; + return this; + } + + /** + * Get the azureResourceType value. + * + * @return the azureResourceType value + */ + public AzureResourceType azureResourceType() { + return this.azureResourceType; + } + + /** + * Set the azureResourceType value. + * + * @param azureResourceType the azureResourceType value to set + * @return the HostName object itself. + */ + public HostName withAzureResourceType(AzureResourceType azureResourceType) { + this.azureResourceType = azureResourceType; + return this; + } + + /** + * Get the customHostNameDnsRecordType value. + * + * @return the customHostNameDnsRecordType value + */ + public CustomHostNameDnsRecordType customHostNameDnsRecordType() { + return this.customHostNameDnsRecordType; + } + + /** + * Set the customHostNameDnsRecordType value. + * + * @param customHostNameDnsRecordType the customHostNameDnsRecordType value to set + * @return the HostName object itself. + */ + public HostName withCustomHostNameDnsRecordType(CustomHostNameDnsRecordType customHostNameDnsRecordType) { + this.customHostNameDnsRecordType = customHostNameDnsRecordType; + return this; + } + + /** + * Get the hostNameType value. + * + * @return the hostNameType value + */ + public HostNameType hostNameType() { + return this.hostNameType; + } + + /** + * Set the hostNameType value. + * + * @param hostNameType the hostNameType value to set + * @return the HostName object itself. + */ + public HostName withHostNameType(HostNameType hostNameType) { + this.hostNameType = hostNameType; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostNameSslState.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostNameSslState.java new file mode 100644 index 00000000000..df255c46f83 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostNameSslState.java @@ -0,0 +1,175 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SSL-enabled hostname. + */ +public class HostNameSslState { + /** + * Hostname. + */ + @JsonProperty(value = "name") + private String name; + + /** + * SSL type. Possible values include: 'Disabled', 'SniEnabled', + * 'IpBasedEnabled'. + */ + @JsonProperty(value = "sslState") + private SslState sslState; + + /** + * Virtual IP address assigned to the hostname if IP based SSL is enabled. + */ + @JsonProperty(value = "virtualIP") + private String virtualIP; + + /** + * SSL certificate thumbprint. + */ + @JsonProperty(value = "thumbprint") + private String thumbprint; + + /** + * Set to <code>true</code> to update existing hostname. + */ + @JsonProperty(value = "toUpdate") + private Boolean toUpdate; + + /** + * Indicates whether the hostname is a standard or repository hostname. + * Possible values include: 'Standard', 'Repository'. + */ + @JsonProperty(value = "hostType") + private HostType hostType; + + /** + * 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 HostNameSslState object itself. + */ + public HostNameSslState withName(String name) { + this.name = name; + return this; + } + + /** + * Get the sslState value. + * + * @return the sslState value + */ + public SslState sslState() { + return this.sslState; + } + + /** + * Set the sslState value. + * + * @param sslState the sslState value to set + * @return the HostNameSslState object itself. + */ + public HostNameSslState withSslState(SslState sslState) { + this.sslState = sslState; + return this; + } + + /** + * Get the virtualIP value. + * + * @return the virtualIP value + */ + public String virtualIP() { + return this.virtualIP; + } + + /** + * Set the virtualIP value. + * + * @param virtualIP the virtualIP value to set + * @return the HostNameSslState object itself. + */ + public HostNameSslState withVirtualIP(String virtualIP) { + this.virtualIP = virtualIP; + return this; + } + + /** + * Get the thumbprint value. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set the thumbprint value. + * + * @param thumbprint the thumbprint value to set + * @return the HostNameSslState object itself. + */ + public HostNameSslState withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Get the toUpdate value. + * + * @return the toUpdate value + */ + public Boolean toUpdate() { + return this.toUpdate; + } + + /** + * Set the toUpdate value. + * + * @param toUpdate the toUpdate value to set + * @return the HostNameSslState object itself. + */ + public HostNameSslState withToUpdate(Boolean toUpdate) { + this.toUpdate = toUpdate; + return this; + } + + /** + * Get the hostType value. + * + * @return the hostType value + */ + public HostType hostType() { + return this.hostType; + } + + /** + * Set the hostType value. + * + * @param hostType the hostType value to set + * @return the HostNameSslState object itself. + */ + public HostNameSslState withHostType(HostType hostType) { + this.hostType = hostType; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostNameType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostNameType.java new file mode 100644 index 00000000000..dce1e63334e --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostNameType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for HostNameType. + */ +public enum HostNameType { + /** Enum value Verified. */ + VERIFIED("Verified"), + + /** Enum value Managed. */ + MANAGED("Managed"); + + /** The actual serialized value for a HostNameType instance. */ + private String value; + + HostNameType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HostNameType instance. + * + * @param value the serialized value to parse. + * @return the parsed HostNameType object, or null if unable to parse. + */ + @JsonCreator + public static HostNameType fromString(String value) { + HostNameType[] items = HostNameType.values(); + for (HostNameType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostType.java new file mode 100644 index 00000000000..32b4b464886 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for HostType. + */ +public enum HostType { + /** Enum value Standard. */ + STANDARD("Standard"), + + /** Enum value Repository. */ + REPOSITORY("Repository"); + + /** The actual serialized value for a HostType instance. */ + private String value; + + HostType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HostType instance. + * + * @param value the serialized value to parse. + * @return the parsed HostType object, or null if unable to parse. + */ + @JsonCreator + public static HostType fromString(String value) { + HostType[] items = HostType.values(); + for (HostType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostingEnvironmentDeploymentInfo.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostingEnvironmentDeploymentInfo.java new file mode 100644 index 00000000000..e774c468f05 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostingEnvironmentDeploymentInfo.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information needed to create resources on an App Service Environment. + */ +public class HostingEnvironmentDeploymentInfo { + /** + * Name of the App Service Environment. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Location of the App Service Environment. + */ + @JsonProperty(value = "location") + private String location; + + /** + * 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 HostingEnvironmentDeploymentInfo object itself. + */ + public HostingEnvironmentDeploymentInfo withName(String name) { + this.name = name; + 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 HostingEnvironmentDeploymentInfo object itself. + */ + public HostingEnvironmentDeploymentInfo withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostingEnvironmentProfile.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostingEnvironmentProfile.java new file mode 100644 index 00000000000..2a0caed4a6c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostingEnvironmentProfile.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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specification for an App Service Environment to use for this resource. + */ +public class HostingEnvironmentProfile { + /** + * Resource ID of the App Service Environment. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Name of the App Service Environment. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Resource type of the App Service Environment. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * 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 HostingEnvironmentProfile object itself. + */ + public HostingEnvironmentProfile withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostingEnvironmentStatus.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostingEnvironmentStatus.java new file mode 100644 index 00000000000..70e8e191d6d --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HostingEnvironmentStatus.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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for HostingEnvironmentStatus. + */ +public enum HostingEnvironmentStatus { + /** Enum value Preparing. */ + PREPARING("Preparing"), + + /** Enum value Ready. */ + READY("Ready"), + + /** Enum value Scaling. */ + SCALING("Scaling"), + + /** Enum value Deleting. */ + DELETING("Deleting"); + + /** The actual serialized value for a HostingEnvironmentStatus instance. */ + private String value; + + HostingEnvironmentStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HostingEnvironmentStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed HostingEnvironmentStatus object, or null if unable to parse. + */ + @JsonCreator + public static HostingEnvironmentStatus fromString(String value) { + HostingEnvironmentStatus[] items = HostingEnvironmentStatus.values(); + for (HostingEnvironmentStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HttpLogsConfig.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HttpLogsConfig.java new file mode 100644 index 00000000000..f124efe0f10 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/HttpLogsConfig.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Http logs configuration. + */ +public class HttpLogsConfig { + /** + * Http logs to file system configuration. + */ + @JsonProperty(value = "fileSystem") + private FileSystemHttpLogsConfig fileSystem; + + /** + * Http logs to azure blob storage configuration. + */ + @JsonProperty(value = "azureBlobStorage") + private AzureBlobStorageHttpLogsConfig azureBlobStorage; + + /** + * Get the fileSystem value. + * + * @return the fileSystem value + */ + public FileSystemHttpLogsConfig fileSystem() { + return this.fileSystem; + } + + /** + * Set the fileSystem value. + * + * @param fileSystem the fileSystem value to set + * @return the HttpLogsConfig object itself. + */ + public HttpLogsConfig withFileSystem(FileSystemHttpLogsConfig fileSystem) { + this.fileSystem = fileSystem; + return this; + } + + /** + * Get the azureBlobStorage value. + * + * @return the azureBlobStorage value + */ + public AzureBlobStorageHttpLogsConfig azureBlobStorage() { + return this.azureBlobStorage; + } + + /** + * Set the azureBlobStorage value. + * + * @param azureBlobStorage the azureBlobStorage value to set + * @return the HttpLogsConfig object itself. + */ + public HttpLogsConfig withAzureBlobStorage(AzureBlobStorageHttpLogsConfig azureBlobStorage) { + this.azureBlobStorage = azureBlobStorage; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/InAvailabilityReasonType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/InAvailabilityReasonType.java new file mode 100644 index 00000000000..36e2ae6f647 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/InAvailabilityReasonType.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for InAvailabilityReasonType. + */ +public final class InAvailabilityReasonType extends ExpandableStringEnum { + /** Static value Invalid for InAvailabilityReasonType. */ + public static final InAvailabilityReasonType INVALID = fromString("Invalid"); + + /** Static value AlreadyExists for InAvailabilityReasonType. */ + public static final InAvailabilityReasonType ALREADY_EXISTS = fromString("AlreadyExists"); + + /** + * Creates or finds a InAvailabilityReasonType from its string representation. + * @param name a name to look for + * @return the corresponding InAvailabilityReasonType + */ + @JsonCreator + public static InAvailabilityReasonType fromString(String name) { + return fromString(name, InAvailabilityReasonType.class); + } + + /** + * @return known InAvailabilityReasonType values + */ + public static Collection values() { + return values(InAvailabilityReasonType.class); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/InternalLoadBalancingMode.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/InternalLoadBalancingMode.java new file mode 100644 index 00000000000..aa37de5a418 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/InternalLoadBalancingMode.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for InternalLoadBalancingMode. + */ +public enum InternalLoadBalancingMode { + /** Enum value None. */ + NONE("None"), + + /** Enum value Web. */ + WEB("Web"), + + /** Enum value Publishing. */ + PUBLISHING("Publishing"); + + /** The actual serialized value for a InternalLoadBalancingMode instance. */ + private String value; + + InternalLoadBalancingMode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a InternalLoadBalancingMode instance. + * + * @param value the serialized value to parse. + * @return the parsed InternalLoadBalancingMode object, or null if unable to parse. + */ + @JsonCreator + public static InternalLoadBalancingMode fromString(String value) { + InternalLoadBalancingMode[] items = InternalLoadBalancingMode.values(); + for (InternalLoadBalancingMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/IpSecurityRestriction.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/IpSecurityRestriction.java new file mode 100644 index 00000000000..b524bca84b7 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/IpSecurityRestriction.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * IP security restriction on an app. + */ +public class IpSecurityRestriction { + /** + * IP address the security restriction is valid for. + */ + @JsonProperty(value = "ipAddress", required = true) + private String ipAddress; + + /** + * Subnet mask for the range of IP addresses the restriction is valid for. + */ + @JsonProperty(value = "subnetMask") + private String subnetMask; + + /** + * Get the ipAddress value. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress value. + * + * @param ipAddress the ipAddress value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the subnetMask value. + * + * @return the subnetMask value + */ + public String subnetMask() { + return this.subnetMask; + } + + /** + * Set the subnetMask value. + * + * @param subnetMask the subnetMask value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withSubnetMask(String subnetMask) { + this.subnetMask = subnetMask; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/IssueType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/IssueType.java new file mode 100644 index 00000000000..6271ff81880 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/IssueType.java @@ -0,0 +1,71 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for IssueType. + */ +public enum IssueType { + /** Enum value ServiceIncident. */ + SERVICE_INCIDENT("ServiceIncident"), + + /** Enum value AppDeployment. */ + APP_DEPLOYMENT("AppDeployment"), + + /** Enum value AppCrash. */ + APP_CRASH("AppCrash"), + + /** Enum value RuntimeIssueDetected. */ + RUNTIME_ISSUE_DETECTED("RuntimeIssueDetected"), + + /** Enum value AseDeployment. */ + ASE_DEPLOYMENT("AseDeployment"), + + /** Enum value UserIssue. */ + USER_ISSUE("UserIssue"), + + /** Enum value PlatformIssue. */ + PLATFORM_ISSUE("PlatformIssue"), + + /** Enum value Other. */ + OTHER("Other"); + + /** The actual serialized value for a IssueType instance. */ + private String value; + + IssueType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a IssueType instance. + * + * @param value the serialized value to parse. + * @return the parsed IssueType object, or null if unable to parse. + */ + @JsonCreator + public static IssueType fromString(String value) { + IssueType[] items = IssueType.values(); + for (IssueType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/KeyVaultSecretStatus.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/KeyVaultSecretStatus.java new file mode 100644 index 00000000000..c0a70fa77da --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/KeyVaultSecretStatus.java @@ -0,0 +1,80 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for KeyVaultSecretStatus. + */ +public enum KeyVaultSecretStatus { + /** Enum value Initialized. */ + INITIALIZED("Initialized"), + + /** Enum value WaitingOnCertificateOrder. */ + WAITING_ON_CERTIFICATE_ORDER("WaitingOnCertificateOrder"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value CertificateOrderFailed. */ + CERTIFICATE_ORDER_FAILED("CertificateOrderFailed"), + + /** Enum value OperationNotPermittedOnKeyVault. */ + OPERATION_NOT_PERMITTED_ON_KEY_VAULT("OperationNotPermittedOnKeyVault"), + + /** Enum value AzureServiceUnauthorizedToAccessKeyVault. */ + AZURE_SERVICE_UNAUTHORIZED_TO_ACCESS_KEY_VAULT("AzureServiceUnauthorizedToAccessKeyVault"), + + /** Enum value KeyVaultDoesNotExist. */ + KEY_VAULT_DOES_NOT_EXIST("KeyVaultDoesNotExist"), + + /** Enum value KeyVaultSecretDoesNotExist. */ + KEY_VAULT_SECRET_DOES_NOT_EXIST("KeyVaultSecretDoesNotExist"), + + /** Enum value UnknownError. */ + UNKNOWN_ERROR("UnknownError"), + + /** Enum value ExternalPrivateKey. */ + EXTERNAL_PRIVATE_KEY("ExternalPrivateKey"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a KeyVaultSecretStatus instance. */ + private String value; + + KeyVaultSecretStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a KeyVaultSecretStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed KeyVaultSecretStatus object, or null if unable to parse. + */ + @JsonCreator + public static KeyVaultSecretStatus fromString(String value) { + KeyVaultSecretStatus[] items = KeyVaultSecretStatus.values(); + for (KeyVaultSecretStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/LocalizableString.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/LocalizableString.java new file mode 100644 index 00000000000..73545a81799 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/LocalizableString.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Localizable string object containing the name and a localized value. + */ +public class LocalizableString { + /** + * Non-localized name. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Localized name. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** + * 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 LocalizableString object itself. + */ + public LocalizableString withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the localizedValue value. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set the localizedValue value. + * + * @param localizedValue the localizedValue value to set + * @return the LocalizableString object itself. + */ + public LocalizableString withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/LogLevel.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/LogLevel.java new file mode 100644 index 00000000000..7ef79cc5cc2 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/LogLevel.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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for LogLevel. + */ +public enum LogLevel { + /** Enum value Off. */ + OFF("Off"), + + /** Enum value Verbose. */ + VERBOSE("Verbose"), + + /** Enum value Information. */ + INFORMATION("Information"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Error. */ + ERROR("Error"); + + /** The actual serialized value for a LogLevel instance. */ + private String value; + + LogLevel(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a LogLevel instance. + * + * @param value the serialized value to parse. + * @return the parsed LogLevel object, or null if unable to parse. + */ + @JsonCreator + public static LogLevel fromString(String value) { + LogLevel[] items = LogLevel.values(); + for (LogLevel item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MSDeployLogEntry.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MSDeployLogEntry.java new file mode 100644 index 00000000000..6930b8cadf0 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MSDeployLogEntry.java @@ -0,0 +1,63 @@ +/** + * 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.web; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * MSDeploy log entry. + */ +public class MSDeployLogEntry { + /** + * Timestamp of log entry. + */ + @JsonProperty(value = "time", access = JsonProperty.Access.WRITE_ONLY) + private DateTime time; + + /** + * Log entry type. Possible values include: 'Message', 'Warning', 'Error'. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private MSDeployLogEntryType type; + + /** + * Log entry message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get the time value. + * + * @return the time value + */ + public DateTime time() { + return this.time; + } + + /** + * Get the type value. + * + * @return the type value + */ + public MSDeployLogEntryType type() { + return this.type; + } + + /** + * Get the message value. + * + * @return the message value + */ + public String message() { + return this.message; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MSDeployLogEntryType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MSDeployLogEntryType.java new file mode 100644 index 00000000000..a2717136608 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MSDeployLogEntryType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for MSDeployLogEntryType. + */ +public enum MSDeployLogEntryType { + /** Enum value Message. */ + MESSAGE("Message"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Error. */ + ERROR("Error"); + + /** The actual serialized value for a MSDeployLogEntryType instance. */ + private String value; + + MSDeployLogEntryType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MSDeployLogEntryType instance. + * + * @param value the serialized value to parse. + * @return the parsed MSDeployLogEntryType object, or null if unable to parse. + */ + @JsonCreator + public static MSDeployLogEntryType fromString(String value) { + MSDeployLogEntryType[] items = MSDeployLogEntryType.values(); + for (MSDeployLogEntryType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MSDeployProvisioningState.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MSDeployProvisioningState.java new file mode 100644 index 00000000000..2b384773463 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MSDeployProvisioningState.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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for MSDeployProvisioningState. + */ +public enum MSDeployProvisioningState { + /** Enum value accepted. */ + ACCEPTED("accepted"), + + /** Enum value running. */ + RUNNING("running"), + + /** Enum value succeeded. */ + SUCCEEDED("succeeded"), + + /** Enum value failed. */ + FAILED("failed"), + + /** Enum value canceled. */ + CANCELED("canceled"); + + /** The actual serialized value for a MSDeployProvisioningState instance. */ + private String value; + + MSDeployProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MSDeployProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed MSDeployProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static MSDeployProvisioningState fromString(String value) { + MSDeployProvisioningState[] items = MSDeployProvisioningState.values(); + for (MSDeployProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ManagedPipelineMode.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ManagedPipelineMode.java new file mode 100644 index 00000000000..8f5bdee55c5 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ManagedPipelineMode.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ManagedPipelineMode. + */ +public enum ManagedPipelineMode { + /** Enum value Integrated. */ + INTEGRATED("Integrated"), + + /** Enum value Classic. */ + CLASSIC("Classic"); + + /** The actual serialized value for a ManagedPipelineMode instance. */ + private String value; + + ManagedPipelineMode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ManagedPipelineMode instance. + * + * @param value the serialized value to parse. + * @return the parsed ManagedPipelineMode object, or null if unable to parse. + */ + @JsonCreator + public static ManagedPipelineMode fromString(String value) { + ManagedPipelineMode[] items = ManagedPipelineMode.values(); + for (ManagedPipelineMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ManagedServiceIdentity.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ManagedServiceIdentity.java new file mode 100644 index 00000000000..3210f092a79 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ManagedServiceIdentity.java @@ -0,0 +1,74 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Managed service identity. + */ +public class ManagedServiceIdentity { + /** + * Type of managed service identity. Possible values include: + * 'SystemAssigned'. + */ + @JsonProperty(value = "type") + private ManagedServiceIdentityType type; + + /** + * Tenant of managed service identity. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * Principal Id of managed service identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * Get the type value. + * + * @return the type value + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the tenantId value. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the principalId value. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ManagedServiceIdentityType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ManagedServiceIdentityType.java new file mode 100644 index 00000000000..6a6dc1245a3 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ManagedServiceIdentityType.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ManagedServiceIdentityType. + */ +public final class ManagedServiceIdentityType extends ExpandableStringEnum { + /** Static value SystemAssigned for ManagedServiceIdentityType. */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** + * Creates or finds a ManagedServiceIdentityType from its string representation. + * @param name a name to look for + * @return the corresponding ManagedServiceIdentityType + */ + @JsonCreator + public static ManagedServiceIdentityType fromString(String name) { + return fromString(name, ManagedServiceIdentityType.class); + } + + /** + * @return known ManagedServiceIdentityType values + */ + public static Collection values() { + return values(ManagedServiceIdentityType.class); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MetricAvailabilily.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MetricAvailabilily.java new file mode 100644 index 00000000000..8ecf3bf01b1 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MetricAvailabilily.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metric availability and retention. + */ +public class MetricAvailabilily { + /** + * Time grain. + */ + @JsonProperty(value = "timeGrain") + private String timeGrain; + + /** + * Retention period for the current time grain. + */ + @JsonProperty(value = "retention") + private String retention; + + /** + * 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 MetricAvailabilily object itself. + */ + public MetricAvailabilily withTimeGrain(String timeGrain) { + this.timeGrain = timeGrain; + return this; + } + + /** + * Get the retention value. + * + * @return the retention value + */ + public String retention() { + return this.retention; + } + + /** + * Set the retention value. + * + * @param retention the retention value to set + * @return the MetricAvailabilily object itself. + */ + public MetricAvailabilily withRetention(String retention) { + this.retention = retention; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MetricAvailability.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MetricAvailability.java new file mode 100644 index 00000000000..3fd0979b938 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MetricAvailability.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Retention policy of a resource metric. + */ +public class MetricAvailability { + /** + * The timeGrain property. + */ + @JsonProperty(value = "timeGrain") + private String timeGrain; + + /** + * The blobDuration property. + */ + @JsonProperty(value = "blobDuration") + private String blobDuration; + + /** + * 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 MetricAvailability object itself. + */ + public MetricAvailability withTimeGrain(String timeGrain) { + this.timeGrain = timeGrain; + return this; + } + + /** + * Get the blobDuration value. + * + * @return the blobDuration value + */ + public String blobDuration() { + return this.blobDuration; + } + + /** + * Set the blobDuration value. + * + * @param blobDuration the blobDuration value to set + * @return the MetricAvailability object itself. + */ + public MetricAvailability withBlobDuration(String blobDuration) { + this.blobDuration = blobDuration; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MetricSpecification.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MetricSpecification.java new file mode 100644 index 00000000000..dbdd8e1a29c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MetricSpecification.java @@ -0,0 +1,408 @@ +/** + * 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.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Definition of a single resource metric. + */ +public class MetricSpecification { + /** + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The displayName property. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The displayDescription property. + */ + @JsonProperty(value = "displayDescription") + private String displayDescription; + + /** + * The unit property. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * The aggregationType property. + */ + @JsonProperty(value = "aggregationType") + private String aggregationType; + + /** + * The supportsInstanceLevelAggregation property. + */ + @JsonProperty(value = "supportsInstanceLevelAggregation") + private Boolean supportsInstanceLevelAggregation; + + /** + * The enableRegionalMdmAccount property. + */ + @JsonProperty(value = "enableRegionalMdmAccount") + private Boolean enableRegionalMdmAccount; + + /** + * The sourceMdmAccount property. + */ + @JsonProperty(value = "sourceMdmAccount") + private String sourceMdmAccount; + + /** + * The sourceMdmNamespace property. + */ + @JsonProperty(value = "sourceMdmNamespace") + private String sourceMdmNamespace; + + /** + * The metricFilterPattern property. + */ + @JsonProperty(value = "metricFilterPattern") + private String metricFilterPattern; + + /** + * The fillGapWithZero property. + */ + @JsonProperty(value = "fillGapWithZero") + private Boolean fillGapWithZero; + + /** + * The isInternal property. + */ + @JsonProperty(value = "isInternal") + private Boolean isInternal; + + /** + * The dimensions property. + */ + @JsonProperty(value = "dimensions") + private List dimensions; + + /** + * The category property. + */ + @JsonProperty(value = "category") + private String category; + + /** + * The availabilities property. + */ + @JsonProperty(value = "availabilities") + private List availabilities; + + /** + * 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 MetricSpecification object itself. + */ + public MetricSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get the displayName value. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName value. + * + * @param displayName the displayName value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the displayDescription value. + * + * @return the displayDescription value + */ + public String displayDescription() { + return this.displayDescription; + } + + /** + * Set the displayDescription value. + * + * @param displayDescription the displayDescription value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayDescription(String displayDescription) { + this.displayDescription = displayDescription; + return this; + } + + /** + * Get the unit value. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit value. + * + * @param unit the unit value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the aggregationType value. + * + * @return the aggregationType value + */ + public String aggregationType() { + return this.aggregationType; + } + + /** + * Set the aggregationType value. + * + * @param aggregationType the aggregationType value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAggregationType(String aggregationType) { + this.aggregationType = aggregationType; + return this; + } + + /** + * Get the supportsInstanceLevelAggregation value. + * + * @return the supportsInstanceLevelAggregation value + */ + public Boolean supportsInstanceLevelAggregation() { + return this.supportsInstanceLevelAggregation; + } + + /** + * Set the supportsInstanceLevelAggregation value. + * + * @param supportsInstanceLevelAggregation the supportsInstanceLevelAggregation value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportsInstanceLevelAggregation(Boolean supportsInstanceLevelAggregation) { + this.supportsInstanceLevelAggregation = supportsInstanceLevelAggregation; + return this; + } + + /** + * Get the enableRegionalMdmAccount value. + * + * @return the enableRegionalMdmAccount value + */ + public Boolean enableRegionalMdmAccount() { + return this.enableRegionalMdmAccount; + } + + /** + * Set the enableRegionalMdmAccount value. + * + * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withEnableRegionalMdmAccount(Boolean enableRegionalMdmAccount) { + this.enableRegionalMdmAccount = enableRegionalMdmAccount; + return this; + } + + /** + * Get the sourceMdmAccount value. + * + * @return the sourceMdmAccount value + */ + public String sourceMdmAccount() { + return this.sourceMdmAccount; + } + + /** + * Set the sourceMdmAccount value. + * + * @param sourceMdmAccount the sourceMdmAccount value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) { + this.sourceMdmAccount = sourceMdmAccount; + return this; + } + + /** + * Get the sourceMdmNamespace value. + * + * @return the sourceMdmNamespace value + */ + public String sourceMdmNamespace() { + return this.sourceMdmNamespace; + } + + /** + * Set the sourceMdmNamespace value. + * + * @param sourceMdmNamespace the sourceMdmNamespace value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) { + this.sourceMdmNamespace = sourceMdmNamespace; + return this; + } + + /** + * Get the metricFilterPattern value. + * + * @return the metricFilterPattern value + */ + public String metricFilterPattern() { + return this.metricFilterPattern; + } + + /** + * Set the metricFilterPattern value. + * + * @param metricFilterPattern the metricFilterPattern value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withMetricFilterPattern(String metricFilterPattern) { + this.metricFilterPattern = metricFilterPattern; + return this; + } + + /** + * Get the fillGapWithZero value. + * + * @return the fillGapWithZero value + */ + public Boolean fillGapWithZero() { + return this.fillGapWithZero; + } + + /** + * Set the fillGapWithZero value. + * + * @param fillGapWithZero the fillGapWithZero value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { + this.fillGapWithZero = fillGapWithZero; + return this; + } + + /** + * Get the isInternal value. + * + * @return the isInternal value + */ + public Boolean isInternal() { + return this.isInternal; + } + + /** + * Set the isInternal value. + * + * @param isInternal the isInternal value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withIsInternal(Boolean isInternal) { + this.isInternal = isInternal; + return this; + } + + /** + * Get the dimensions value. + * + * @return the dimensions value + */ + public List dimensions() { + return this.dimensions; + } + + /** + * Set the dimensions value. + * + * @param dimensions the dimensions value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDimensions(List dimensions) { + this.dimensions = dimensions; + return this; + } + + /** + * Get the category value. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set the category value. + * + * @param category the category value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the availabilities value. + * + * @return the availabilities value + */ + public List availabilities() { + return this.availabilities; + } + + /** + * Set the availabilities value. + * + * @param availabilities the availabilities value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAvailabilities(List availabilities) { + this.availabilities = availabilities; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MySqlMigrationType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MySqlMigrationType.java new file mode 100644 index 00000000000..b119da9b007 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/MySqlMigrationType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for MySqlMigrationType. + */ +public enum MySqlMigrationType { + /** Enum value LocalToRemote. */ + LOCAL_TO_REMOTE("LocalToRemote"), + + /** Enum value RemoteToLocal. */ + REMOTE_TO_LOCAL("RemoteToLocal"); + + /** The actual serialized value for a MySqlMigrationType instance. */ + private String value; + + MySqlMigrationType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MySqlMigrationType instance. + * + * @param value the serialized value to parse. + * @return the parsed MySqlMigrationType object, or null if unable to parse. + */ + @JsonCreator + public static MySqlMigrationType fromString(String value) { + MySqlMigrationType[] items = MySqlMigrationType.values(); + for (MySqlMigrationType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/NameValuePair.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/NameValuePair.java new file mode 100644 index 00000000000..fd8fdd3899f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/NameValuePair.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Name value pair. + */ +public class NameValuePair { + /** + * Pair name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Pair value. + */ + @JsonProperty(value = "value") + private String value; + + /** + * 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 NameValuePair object itself. + */ + public NameValuePair 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 NameValuePair object itself. + */ + public NameValuePair withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/NetworkAccessControlEntry.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/NetworkAccessControlEntry.java new file mode 100644 index 00000000000..5fe66cc221e --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/NetworkAccessControlEntry.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network access control entry. + */ +public class NetworkAccessControlEntry { + /** + * Action object. Possible values include: 'Permit', 'Deny'. + */ + @JsonProperty(value = "action") + private AccessControlEntryAction action; + + /** + * Description of network access control entry. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Order of precedence. + */ + @JsonProperty(value = "order") + private Integer order; + + /** + * Remote subnet. + */ + @JsonProperty(value = "remoteSubnet") + private String remoteSubnet; + + /** + * Get the action value. + * + * @return the action value + */ + public AccessControlEntryAction action() { + return this.action; + } + + /** + * Set the action value. + * + * @param action the action value to set + * @return the NetworkAccessControlEntry object itself. + */ + public NetworkAccessControlEntry withAction(AccessControlEntryAction action) { + this.action = action; + return this; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the NetworkAccessControlEntry object itself. + */ + public NetworkAccessControlEntry withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the order value. + * + * @return the order value + */ + public Integer order() { + return this.order; + } + + /** + * Set the order value. + * + * @param order the order value to set + * @return the NetworkAccessControlEntry object itself. + */ + public NetworkAccessControlEntry withOrder(Integer order) { + this.order = order; + return this; + } + + /** + * Get the remoteSubnet value. + * + * @return the remoteSubnet value + */ + public String remoteSubnet() { + return this.remoteSubnet; + } + + /** + * Set the remoteSubnet value. + * + * @param remoteSubnet the remoteSubnet value to set + * @return the NetworkAccessControlEntry object itself. + */ + public NetworkAccessControlEntry withRemoteSubnet(String remoteSubnet) { + this.remoteSubnet = remoteSubnet; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/NotificationLevel.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/NotificationLevel.java new file mode 100644 index 00000000000..fea9ab4ecd6 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/NotificationLevel.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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for NotificationLevel. + */ +public enum NotificationLevel { + /** Enum value Critical. */ + CRITICAL("Critical"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Information. */ + INFORMATION("Information"), + + /** Enum value NonUrgentSuggestion. */ + NON_URGENT_SUGGESTION("NonUrgentSuggestion"); + + /** The actual serialized value for a NotificationLevel instance. */ + private String value; + + NotificationLevel(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a NotificationLevel instance. + * + * @param value the serialized value to parse. + * @return the parsed NotificationLevel object, or null if unable to parse. + */ + @JsonCreator + public static NotificationLevel fromString(String value) { + NotificationLevel[] items = NotificationLevel.values(); + for (NotificationLevel item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/OperationStatus.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/OperationStatus.java new file mode 100644 index 00000000000..e95e1341f20 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/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.web; + +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-web/src/main/java/com/microsoft/azure/management/web/PerfMonSample.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/PerfMonSample.java new file mode 100644 index 00000000000..14220eee063 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/PerfMonSample.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Performance monitor sample in a set. + */ +public class PerfMonSample { + /** + * Point in time for which counter was measured. + */ + @JsonProperty(value = "time") + private DateTime time; + + /** + * Name of the server on which the measurement is made. + */ + @JsonProperty(value = "instanceName") + private String instanceName; + + /** + * Value of counter at a certain time. + */ + @JsonProperty(value = "value") + private Double value; + + /** + * Core Count of worker. Not a data member. + */ + @JsonProperty(value = "coreCount") + private Integer coreCount; + + /** + * 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; + } + + /** + * Get the coreCount value. + * + * @return the coreCount value + */ + public Integer coreCount() { + return this.coreCount; + } + + /** + * Set the coreCount value. + * + * @param coreCount the coreCount value to set + * @return the PerfMonSample object itself. + */ + public PerfMonSample withCoreCount(Integer coreCount) { + this.coreCount = coreCount; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/PerfMonSet.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/PerfMonSet.java new file mode 100644 index 00000000000..2a55cfe0ea5 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/PerfMonSet.java @@ -0,0 +1,149 @@ +/** + * 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.web; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metric information. + */ +public class PerfMonSet { + /** + * Unique key name of the counter. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Start time of the period. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * End time of the period. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * Presented time grain. + */ + @JsonProperty(value = "timeGrain") + private String timeGrain; + + /** + * Collection of workers that are active during this time. + */ + @JsonProperty(value = "values") + 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-web/src/main/java/com/microsoft/azure/management/web/ProvisioningState.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ProvisioningState.java new file mode 100644 index 00000000000..1a15ef11ad5 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ProvisioningState.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ProvisioningState. + */ +public enum ProvisioningState { + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Canceled. */ + CANCELED("Canceled"), + + /** Enum value InProgress. */ + IN_PROGRESS("InProgress"), + + /** Enum value Deleting. */ + DELETING("Deleting"); + + /** The actual serialized value for a ProvisioningState instance. */ + private String value; + + ProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed ProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static ProvisioningState fromString(String value) { + ProvisioningState[] items = ProvisioningState.values(); + for (ProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ProxyOnlyResource.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ProxyOnlyResource.java new file mode 100644 index 00000000000..50731047358 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ProxyOnlyResource.java @@ -0,0 +1,89 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure proxy only resource. This resource is not tracked by Azure Resource + * Manager. + */ +public class ProxyOnlyResource { + /** + * Resource Id. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Resource Name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the kind value. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind value. + * + * @param kind the kind value to set + * @return the ProxyOnlyResource object itself. + */ + public ProxyOnlyResource withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/PublicCertificateLocation.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/PublicCertificateLocation.java new file mode 100644 index 00000000000..342ba13873a --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/PublicCertificateLocation.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PublicCertificateLocation. + */ +public enum PublicCertificateLocation { + /** Enum value CurrentUserMy. */ + CURRENT_USER_MY("CurrentUserMy"), + + /** Enum value LocalMachineMy. */ + LOCAL_MACHINE_MY("LocalMachineMy"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a PublicCertificateLocation instance. */ + private String value; + + PublicCertificateLocation(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PublicCertificateLocation instance. + * + * @param value the serialized value to parse. + * @return the parsed PublicCertificateLocation object, or null if unable to parse. + */ + @JsonCreator + public static PublicCertificateLocation fromString(String value) { + PublicCertificateLocation[] items = PublicCertificateLocation.values(); + for (PublicCertificateLocation item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/PublishingProfileFormat.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/PublishingProfileFormat.java new file mode 100644 index 00000000000..93b85930381 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/PublishingProfileFormat.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PublishingProfileFormat. + */ +public final class PublishingProfileFormat extends ExpandableStringEnum { + /** Static value FileZilla3 for PublishingProfileFormat. */ + public static final PublishingProfileFormat FILE_ZILLA3 = fromString("FileZilla3"); + + /** Static value WebDeploy for PublishingProfileFormat. */ + public static final PublishingProfileFormat WEB_DEPLOY = fromString("WebDeploy"); + + /** Static value Ftp for PublishingProfileFormat. */ + public static final PublishingProfileFormat FTP = fromString("Ftp"); + + /** + * Creates or finds a PublishingProfileFormat from its string representation. + * @param name a name to look for + * @return the corresponding PublishingProfileFormat + */ + @JsonCreator + public static PublishingProfileFormat fromString(String name) { + return fromString(name, PublishingProfileFormat.class); + } + + /** + * @return known PublishingProfileFormat values + */ + public static Collection values() { + return values(PublishingProfileFormat.class); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/RampUpRule.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/RampUpRule.java new file mode 100644 index 00000000000..c2ad6248930 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/RampUpRule.java @@ -0,0 +1,240 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Routing rules for ramp up testing. This rule allows to redirect static + * traffic % to a slot or to gradually change routing % based on performance. + */ +public class RampUpRule { + /** + * Hostname of a slot to which the traffic will be redirected if decided + * to. E.g. myapp-stage.azurewebsites.net. + */ + @JsonProperty(value = "actionHostName") + private String actionHostName; + + /** + * Percentage of the traffic which will be redirected to + * <code>ActionHostName</code>. + */ + @JsonProperty(value = "reroutePercentage") + private Double reroutePercentage; + + /** + * In auto ramp up scenario this is the step to to add/remove from + * <code>ReroutePercentage</code> until it reaches + * <code>MinReroutePercentage</code> or + * <code>MaxReroutePercentage</code>. Site metrics are checked + * every N minutes specificed in + * <code>ChangeIntervalInMinutes</code>. + * Custom decision algorithm can be provided in TiPCallback site extension + * which URL can be specified in + * <code>ChangeDecisionCallbackUrl</code>. + */ + @JsonProperty(value = "changeStep") + private Double changeStep; + + /** + * Specifies interval in mimuntes to reevaluate ReroutePercentage. + */ + @JsonProperty(value = "changeIntervalInMinutes") + private Integer changeIntervalInMinutes; + + /** + * Specifies lower boundary above which ReroutePercentage will stay. + */ + @JsonProperty(value = "minReroutePercentage") + private Double minReroutePercentage; + + /** + * Specifies upper boundary below which ReroutePercentage will stay. + */ + @JsonProperty(value = "maxReroutePercentage") + private Double maxReroutePercentage; + + /** + * Custom decision algorithm can be provided in TiPCallback site extension + * which URL can be specified. See TiPCallback site extension for the + * scaffold and contracts. + * https://www.siteextensions.net/packages/TiPCallback/. + */ + @JsonProperty(value = "changeDecisionCallbackUrl") + private String changeDecisionCallbackUrl; + + /** + * Name of the routing rule. The recommended name would be to point to the + * slot which will receive the traffic in the experiment. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Get the actionHostName value. + * + * @return the actionHostName value + */ + public String actionHostName() { + return this.actionHostName; + } + + /** + * Set the actionHostName value. + * + * @param actionHostName the actionHostName value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withActionHostName(String actionHostName) { + this.actionHostName = actionHostName; + return this; + } + + /** + * Get the reroutePercentage value. + * + * @return the reroutePercentage value + */ + public Double reroutePercentage() { + return this.reroutePercentage; + } + + /** + * Set the reroutePercentage value. + * + * @param reroutePercentage the reroutePercentage value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withReroutePercentage(Double reroutePercentage) { + this.reroutePercentage = reroutePercentage; + return this; + } + + /** + * Get the changeStep value. + * + * @return the changeStep value + */ + public Double changeStep() { + return this.changeStep; + } + + /** + * Set the changeStep value. + * + * @param changeStep the changeStep value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withChangeStep(Double changeStep) { + this.changeStep = changeStep; + return this; + } + + /** + * Get the changeIntervalInMinutes value. + * + * @return the changeIntervalInMinutes value + */ + public Integer changeIntervalInMinutes() { + return this.changeIntervalInMinutes; + } + + /** + * Set the changeIntervalInMinutes value. + * + * @param changeIntervalInMinutes the changeIntervalInMinutes value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withChangeIntervalInMinutes(Integer changeIntervalInMinutes) { + this.changeIntervalInMinutes = changeIntervalInMinutes; + return this; + } + + /** + * Get the minReroutePercentage value. + * + * @return the minReroutePercentage value + */ + public Double minReroutePercentage() { + return this.minReroutePercentage; + } + + /** + * Set the minReroutePercentage value. + * + * @param minReroutePercentage the minReroutePercentage value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withMinReroutePercentage(Double minReroutePercentage) { + this.minReroutePercentage = minReroutePercentage; + return this; + } + + /** + * Get the maxReroutePercentage value. + * + * @return the maxReroutePercentage value + */ + public Double maxReroutePercentage() { + return this.maxReroutePercentage; + } + + /** + * Set the maxReroutePercentage value. + * + * @param maxReroutePercentage the maxReroutePercentage value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withMaxReroutePercentage(Double maxReroutePercentage) { + this.maxReroutePercentage = maxReroutePercentage; + return this; + } + + /** + * Get the changeDecisionCallbackUrl value. + * + * @return the changeDecisionCallbackUrl value + */ + public String changeDecisionCallbackUrl() { + return this.changeDecisionCallbackUrl; + } + + /** + * Set the changeDecisionCallbackUrl value. + * + * @param changeDecisionCallbackUrl the changeDecisionCallbackUrl value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withChangeDecisionCallbackUrl(String changeDecisionCallbackUrl) { + this.changeDecisionCallbackUrl = changeDecisionCallbackUrl; + 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 RampUpRule object itself. + */ + public RampUpRule withName(String name) { + this.name = name; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/RequestsBasedTrigger.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/RequestsBasedTrigger.java new file mode 100644 index 00000000000..ef34bb8c820 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/RequestsBasedTrigger.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Trigger based on total requests. + */ +public class RequestsBasedTrigger { + /** + * Request Count. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * Time interval. + */ + @JsonProperty(value = "timeInterval") + private String timeInterval; + + /** + * Get the count value. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set the count value. + * + * @param count the count value to set + * @return the RequestsBasedTrigger object itself. + */ + public RequestsBasedTrigger withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the timeInterval value. + * + * @return the timeInterval value + */ + public String timeInterval() { + return this.timeInterval; + } + + /** + * Set the timeInterval value. + * + * @param timeInterval the timeInterval value to set + * @return the RequestsBasedTrigger object itself. + */ + public RequestsBasedTrigger withTimeInterval(String timeInterval) { + this.timeInterval = timeInterval; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricAvailability.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricAvailability.java new file mode 100644 index 00000000000..535d049199c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricAvailability.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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metrics availability and retention. + */ +public class ResourceMetricAvailability { + /** + * Time grain . + */ + @JsonProperty(value = "timeGrain", access = JsonProperty.Access.WRITE_ONLY) + private String timeGrain; + + /** + * Retention period for the current time grain. + */ + @JsonProperty(value = "retention", access = JsonProperty.Access.WRITE_ONLY) + private String retention; + + /** + * Get the timeGrain value. + * + * @return the timeGrain value + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Get the retention value. + * + * @return the retention value + */ + public String retention() { + return this.retention; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricName.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricName.java new file mode 100644 index 00000000000..8561176f7a7 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricName.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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Name of a metric for any resource . + */ +public class ResourceMetricName { + /** + * metric name value. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** + * Localized metric name value. + */ + @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) + private String localizedValue; + + /** + * Get the value value. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Get the localizedValue value. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricProperty.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricProperty.java new file mode 100644 index 00000000000..da53d55bc59 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricProperty.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Resource metric property. + */ +public class ResourceMetricProperty { + /** + * Key for resource metric property. + */ + @JsonProperty(value = "key") + private String key; + + /** + * Value of pair. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the key value. + * + * @return the key value + */ + 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. + * + * @return the value value + */ + 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-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricValue.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricValue.java new file mode 100644 index 00000000000..c9fce36dc2e --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceMetricValue.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Value of resource metric. + */ +public class ResourceMetricValue { + /** + * Value timestamp. + */ + @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) + private String timestamp; + + /** + * Value average. + */ + @JsonProperty(value = "average", access = JsonProperty.Access.WRITE_ONLY) + private Double average; + + /** + * Value minimum. + */ + @JsonProperty(value = "minimum", access = JsonProperty.Access.WRITE_ONLY) + private Double minimum; + + /** + * Value maximum. + */ + @JsonProperty(value = "maximum", access = JsonProperty.Access.WRITE_ONLY) + private Double maximum; + + /** + * Value total. + */ + @JsonProperty(value = "total", access = JsonProperty.Access.WRITE_ONLY) + private Double total; + + /** + * Value count. + */ + @JsonProperty(value = "count", access = JsonProperty.Access.WRITE_ONLY) + private Double count; + + /** + * Resource metric properties collection. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private List properties; + + /** + * Get the timestamp value. + * + * @return the timestamp value + */ + public String timestamp() { + return this.timestamp; + } + + /** + * Get the average value. + * + * @return the average value + */ + public Double average() { + return this.average; + } + + /** + * Get the minimum value. + * + * @return the minimum value + */ + public Double minimum() { + return this.minimum; + } + + /** + * Get the maximum value. + * + * @return the maximum value + */ + public Double maximum() { + return this.maximum; + } + + /** + * Get the total value. + * + * @return the total value + */ + public Double total() { + return this.total; + } + + /** + * Get the count value. + * + * @return the count value + */ + public Double count() { + return this.count; + } + + /** + * Get the properties value. + * + * @return the properties value + */ + public List properties() { + return this.properties; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceNameAvailabilityRequest.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceNameAvailabilityRequest.java new file mode 100644 index 00000000000..e07cf83c400 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceNameAvailabilityRequest.java @@ -0,0 +1,98 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Resource name availability request content. + */ +public class ResourceNameAvailabilityRequest { + /** + * Resource name to verify. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Resource type used for verification. Possible values include: 'Site', + * 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', + * 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', + * 'Microsoft.Web/publishingUsers'. + */ + @JsonProperty(value = "type", required = true) + private CheckNameResourceTypes type; + + /** + * Is fully qualified domain name. + */ + @JsonProperty(value = "isFqdn") + private Boolean isFqdn; + + /** + * 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 ResourceNameAvailabilityRequest object itself. + */ + public ResourceNameAvailabilityRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public CheckNameResourceTypes type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the ResourceNameAvailabilityRequest object itself. + */ + public ResourceNameAvailabilityRequest withType(CheckNameResourceTypes type) { + this.type = type; + return this; + } + + /** + * Get the isFqdn value. + * + * @return the isFqdn value + */ + public Boolean isFqdn() { + return this.isFqdn; + } + + /** + * Set the isFqdn value. + * + * @param isFqdn the isFqdn value to set + * @return the ResourceNameAvailabilityRequest object itself. + */ + public ResourceNameAvailabilityRequest withIsFqdn(Boolean isFqdn) { + this.isFqdn = isFqdn; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceScopeType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceScopeType.java new file mode 100644 index 00000000000..5f299ea464f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResourceScopeType.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ResourceScopeType. + */ +public final class ResourceScopeType extends ExpandableStringEnum { + /** Static value ServerFarm for ResourceScopeType. */ + public static final ResourceScopeType SERVER_FARM = fromString("ServerFarm"); + + /** Static value Subscription for ResourceScopeType. */ + public static final ResourceScopeType SUBSCRIPTION = fromString("Subscription"); + + /** Static value WebSite for ResourceScopeType. */ + public static final ResourceScopeType WEB_SITE = fromString("WebSite"); + + /** + * Creates or finds a ResourceScopeType from its string representation. + * @param name a name to look for + * @return the corresponding ResourceScopeType + */ + @JsonCreator + public static ResourceScopeType fromString(String name) { + return fromString(name, ResourceScopeType.class); + } + + /** + * @return known ResourceScopeType values + */ + public static Collection values() { + return values(ResourceScopeType.class); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResponseMetaData.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResponseMetaData.java new file mode 100644 index 00000000000..ff1439162dc --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ResponseMetaData.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ResponseMetaData model. + */ +public class ResponseMetaData { + /** + * Source of the Data. + */ + @JsonProperty(value = "dataSource") + private DataSource dataSource; + + /** + * Get the dataSource value. + * + * @return the dataSource value + */ + public DataSource dataSource() { + return this.dataSource; + } + + /** + * Set the dataSource value. + * + * @param dataSource the dataSource value to set + * @return the ResponseMetaData object itself. + */ + public ResponseMetaData withDataSource(DataSource dataSource) { + this.dataSource = dataSource; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/RouteType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/RouteType.java new file mode 100644 index 00000000000..f96916e95cc --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/RouteType.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for RouteType. + */ +public final class RouteType extends ExpandableStringEnum { + /** Static value DEFAULT for RouteType. */ + public static final RouteType DEFAULT = fromString("DEFAULT"); + + /** Static value INHERITED for RouteType. */ + public static final RouteType INHERITED = fromString("INHERITED"); + + /** Static value STATIC for RouteType. */ + public static final RouteType STATIC = fromString("STATIC"); + + /** + * Creates or finds a RouteType from its string representation. + * @param name a name to look for + * @return the corresponding RouteType + */ + @JsonCreator + public static RouteType fromString(String name) { + return fromString(name, RouteType.class); + } + + /** + * @return known RouteType values + */ + public static Collection values() { + return values(RouteType.class); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ScmType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ScmType.java new file mode 100644 index 00000000000..eccc9d61d74 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ScmType.java @@ -0,0 +1,74 @@ +/** + * 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.web; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ScmType. + */ +public final class ScmType extends ExpandableStringEnum { + /** Static value None for ScmType. */ + public static final ScmType NONE = fromString("None"); + + /** Static value Dropbox for ScmType. */ + public static final ScmType DROPBOX = fromString("Dropbox"); + + /** Static value Tfs for ScmType. */ + public static final ScmType TFS = fromString("Tfs"); + + /** Static value LocalGit for ScmType. */ + public static final ScmType LOCAL_GIT = fromString("LocalGit"); + + /** Static value GitHub for ScmType. */ + public static final ScmType GIT_HUB = fromString("GitHub"); + + /** Static value CodePlexGit for ScmType. */ + public static final ScmType CODE_PLEX_GIT = fromString("CodePlexGit"); + + /** Static value CodePlexHg for ScmType. */ + public static final ScmType CODE_PLEX_HG = fromString("CodePlexHg"); + + /** Static value BitbucketGit for ScmType. */ + public static final ScmType BITBUCKET_GIT = fromString("BitbucketGit"); + + /** Static value BitbucketHg for ScmType. */ + public static final ScmType BITBUCKET_HG = fromString("BitbucketHg"); + + /** Static value ExternalGit for ScmType. */ + public static final ScmType EXTERNAL_GIT = fromString("ExternalGit"); + + /** Static value ExternalHg for ScmType. */ + public static final ScmType EXTERNAL_HG = fromString("ExternalHg"); + + /** Static value OneDrive for ScmType. */ + public static final ScmType ONE_DRIVE = fromString("OneDrive"); + + /** Static value VSO for ScmType. */ + public static final ScmType VSO = fromString("VSO"); + + /** + * Creates or finds a ScmType from its string representation. + * @param name a name to look for + * @return the corresponding ScmType + */ + @JsonCreator + public static ScmType fromString(String name) { + return fromString(name, ScmType.class); + } + + /** + * @return known ScmType values + */ + public static Collection values() { + return values(ScmType.class); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ServiceSpecification.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ServiceSpecification.java new file mode 100644 index 00000000000..4dfcfe478bd --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ServiceSpecification.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Resource metrics service provided by Microsoft.Insights resource provider. + */ +public class ServiceSpecification { + /** + * The metricSpecifications property. + */ + @JsonProperty(value = "metricSpecifications") + private List metricSpecifications; + + /** + * Get the metricSpecifications value. + * + * @return the metricSpecifications value + */ + public List metricSpecifications() { + return this.metricSpecifications; + } + + /** + * Set the metricSpecifications value. + * + * @param metricSpecifications the metricSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withMetricSpecifications(List metricSpecifications) { + this.metricSpecifications = metricSpecifications; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteAvailabilityState.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteAvailabilityState.java new file mode 100644 index 00000000000..d30b94b483a --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteAvailabilityState.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SiteAvailabilityState. + */ +public enum SiteAvailabilityState { + /** Enum value Normal. */ + NORMAL("Normal"), + + /** Enum value Limited. */ + LIMITED("Limited"), + + /** Enum value DisasterRecoveryMode. */ + DISASTER_RECOVERY_MODE("DisasterRecoveryMode"); + + /** The actual serialized value for a SiteAvailabilityState instance. */ + private String value; + + SiteAvailabilityState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SiteAvailabilityState instance. + * + * @param value the serialized value to parse. + * @return the parsed SiteAvailabilityState object, or null if unable to parse. + */ + @JsonCreator + public static SiteAvailabilityState fromString(String value) { + SiteAvailabilityState[] items = SiteAvailabilityState.values(); + for (SiteAvailabilityState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteCloneabilityCriterion.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteCloneabilityCriterion.java new file mode 100644 index 00000000000..4bf36f62730 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteCloneabilityCriterion.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An app cloneability criterion. + */ +public class SiteCloneabilityCriterion { + /** + * Name of criterion. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Description of criterion. + */ + @JsonProperty(value = "description") + private String description; + + /** + * 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 SiteCloneabilityCriterion object itself. + */ + public SiteCloneabilityCriterion withName(String name) { + this.name = name; + return this; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the SiteCloneabilityCriterion object itself. + */ + public SiteCloneabilityCriterion withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteConfig.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteConfig.java new file mode 100644 index 00000000000..bbc96abadc2 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteConfig.java @@ -0,0 +1,1194 @@ +/** + * 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.web; + +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.implementation.PushSettingsInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration of an App Service app. + */ +public class SiteConfig { + /** + * Number of workers. + */ + @JsonProperty(value = "numberOfWorkers") + private Integer numberOfWorkers; + + /** + * Default documents. + */ + @JsonProperty(value = "defaultDocuments") + private List defaultDocuments; + + /** + * .NET Framework version. + */ + @JsonProperty(value = "netFrameworkVersion") + private String netFrameworkVersion; + + /** + * Version of PHP. + */ + @JsonProperty(value = "phpVersion") + private String phpVersion; + + /** + * Version of Python. + */ + @JsonProperty(value = "pythonVersion") + private String pythonVersion; + + /** + * Version of Node.js. + */ + @JsonProperty(value = "nodeVersion") + private String nodeVersion; + + /** + * Linux App Framework and version. + */ + @JsonProperty(value = "linuxFxVersion") + private String linuxFxVersion; + + /** + * <code>true</code> if request tracing is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "requestTracingEnabled") + private Boolean requestTracingEnabled; + + /** + * Request tracing expiration time. + */ + @JsonProperty(value = "requestTracingExpirationTime") + private DateTime requestTracingExpirationTime; + + /** + * <code>true</code> if remote debugging is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "remoteDebuggingEnabled") + private Boolean remoteDebuggingEnabled; + + /** + * Remote debugging version. + */ + @JsonProperty(value = "remoteDebuggingVersion") + private String remoteDebuggingVersion; + + /** + * <code>true</code> if HTTP logging is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "httpLoggingEnabled") + private Boolean httpLoggingEnabled; + + /** + * HTTP logs directory size limit. + */ + @JsonProperty(value = "logsDirectorySizeLimit") + private Integer logsDirectorySizeLimit; + + /** + * <code>true</code> if detailed error logging is enabled; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "detailedErrorLoggingEnabled") + private Boolean detailedErrorLoggingEnabled; + + /** + * Publishing user name. + */ + @JsonProperty(value = "publishingUsername") + private String publishingUsername; + + /** + * Application settings. + */ + @JsonProperty(value = "appSettings") + private List appSettings; + + /** + * Connection strings. + */ + @JsonProperty(value = "connectionStrings") + private List connectionStrings; + + /** + * Site MachineKey. + */ + @JsonProperty(value = "machineKey", access = JsonProperty.Access.WRITE_ONLY) + private SiteMachineKey machineKey; + + /** + * Handler mappings. + */ + @JsonProperty(value = "handlerMappings") + private List handlerMappings; + + /** + * Document root. + */ + @JsonProperty(value = "documentRoot") + private String documentRoot; + + /** + * SCM type. Possible values include: 'None', 'Dropbox', 'Tfs', 'LocalGit', + * 'GitHub', 'CodePlexGit', 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', + * 'ExternalGit', 'ExternalHg', 'OneDrive', 'VSO'. + */ + @JsonProperty(value = "scmType") + private ScmType scmType; + + /** + * <code>true</code> to use 32-bit worker process; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "use32BitWorkerProcess") + private Boolean use32BitWorkerProcess; + + /** + * <code>true</code> if WebSocket is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "webSocketsEnabled") + private Boolean webSocketsEnabled; + + /** + * <code>true</code> if Always On is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "alwaysOn") + private Boolean alwaysOn; + + /** + * Java version. + */ + @JsonProperty(value = "javaVersion") + private String javaVersion; + + /** + * Java container. + */ + @JsonProperty(value = "javaContainer") + private String javaContainer; + + /** + * Java container version. + */ + @JsonProperty(value = "javaContainerVersion") + private String javaContainerVersion; + + /** + * App command line to launch. + */ + @JsonProperty(value = "appCommandLine") + private String appCommandLine; + + /** + * Managed pipeline mode. Possible values include: 'Integrated', 'Classic'. + */ + @JsonProperty(value = "managedPipelineMode") + private ManagedPipelineMode managedPipelineMode; + + /** + * Virtual applications. + */ + @JsonProperty(value = "virtualApplications") + private List virtualApplications; + + /** + * Site load balancing. Possible values include: 'WeightedRoundRobin', + * 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', + * 'RequestHash'. + */ + @JsonProperty(value = "loadBalancing") + private SiteLoadBalancing loadBalancing; + + /** + * This is work around for polymophic types. + */ + @JsonProperty(value = "experiments") + private Experiments experiments; + + /** + * Site limits. + */ + @JsonProperty(value = "limits") + private SiteLimits limits; + + /** + * <code>true</code> if Auto Heal is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "autoHealEnabled") + private Boolean autoHealEnabled; + + /** + * Auto Heal rules. + */ + @JsonProperty(value = "autoHealRules") + private AutoHealRules autoHealRules; + + /** + * Tracing options. + */ + @JsonProperty(value = "tracingOptions") + private String tracingOptions; + + /** + * Virtual Network name. + */ + @JsonProperty(value = "vnetName") + private String vnetName; + + /** + * Cross-Origin Resource Sharing (CORS) settings. + */ + @JsonProperty(value = "cors") + private CorsSettings cors; + + /** + * Push endpoint settings. + */ + @JsonProperty(value = "push") + private PushSettingsInner push; + + /** + * Information about the formal API definition for the app. + */ + @JsonProperty(value = "apiDefinition") + private ApiDefinitionInfo apiDefinition; + + /** + * Auto-swap slot name. + */ + @JsonProperty(value = "autoSwapSlotName") + private String autoSwapSlotName; + + /** + * <code>true</code> to enable local MySQL; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "localMySqlEnabled") + private Boolean localMySqlEnabled; + + /** + * IP security restrictions. + */ + @JsonProperty(value = "ipSecurityRestrictions") + private List ipSecurityRestrictions; + + /** + * Http20Enabled: configures a web site to allow clients to connect over + * http2.0. + */ + @JsonProperty(value = "http20Enabled") + private Boolean http20Enabled; + + /** + * MinTlsVersion: configures the minimum version of TLS required for SSL + * requests. Possible values include: '1.0', '1.1', '1.2'. + */ + @JsonProperty(value = "minTlsVersion") + private SupportedTlsVersions minTlsVersion; + + /** + * Get the numberOfWorkers value. + * + * @return the numberOfWorkers value + */ + public Integer numberOfWorkers() { + return this.numberOfWorkers; + } + + /** + * Set the numberOfWorkers value. + * + * @param numberOfWorkers the numberOfWorkers value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withNumberOfWorkers(Integer numberOfWorkers) { + this.numberOfWorkers = numberOfWorkers; + return this; + } + + /** + * Get the defaultDocuments value. + * + * @return the defaultDocuments value + */ + public List defaultDocuments() { + return this.defaultDocuments; + } + + /** + * Set the defaultDocuments value. + * + * @param defaultDocuments the defaultDocuments value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withDefaultDocuments(List defaultDocuments) { + this.defaultDocuments = defaultDocuments; + return this; + } + + /** + * Get the netFrameworkVersion value. + * + * @return the netFrameworkVersion value + */ + public String netFrameworkVersion() { + return this.netFrameworkVersion; + } + + /** + * Set the netFrameworkVersion value. + * + * @param netFrameworkVersion the netFrameworkVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withNetFrameworkVersion(String netFrameworkVersion) { + this.netFrameworkVersion = netFrameworkVersion; + return this; + } + + /** + * Get the phpVersion value. + * + * @return the phpVersion value + */ + public String phpVersion() { + return this.phpVersion; + } + + /** + * Set the phpVersion value. + * + * @param phpVersion the phpVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withPhpVersion(String phpVersion) { + this.phpVersion = phpVersion; + return this; + } + + /** + * Get the pythonVersion value. + * + * @return the pythonVersion value + */ + public String pythonVersion() { + return this.pythonVersion; + } + + /** + * Set the pythonVersion value. + * + * @param pythonVersion the pythonVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withPythonVersion(String pythonVersion) { + this.pythonVersion = 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 SiteConfig object itself. + */ + public SiteConfig withNodeVersion(String nodeVersion) { + this.nodeVersion = nodeVersion; + return this; + } + + /** + * Get the linuxFxVersion value. + * + * @return the linuxFxVersion value + */ + public String linuxFxVersion() { + return this.linuxFxVersion; + } + + /** + * Set the linuxFxVersion value. + * + * @param linuxFxVersion the linuxFxVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withLinuxFxVersion(String linuxFxVersion) { + this.linuxFxVersion = linuxFxVersion; + return this; + } + + /** + * Get the requestTracingEnabled value. + * + * @return the requestTracingEnabled value + */ + public Boolean requestTracingEnabled() { + return this.requestTracingEnabled; + } + + /** + * Set the requestTracingEnabled value. + * + * @param requestTracingEnabled the requestTracingEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withRequestTracingEnabled(Boolean requestTracingEnabled) { + this.requestTracingEnabled = requestTracingEnabled; + return this; + } + + /** + * Get the requestTracingExpirationTime value. + * + * @return the requestTracingExpirationTime value + */ + public DateTime requestTracingExpirationTime() { + return this.requestTracingExpirationTime; + } + + /** + * Set the requestTracingExpirationTime value. + * + * @param requestTracingExpirationTime the requestTracingExpirationTime value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withRequestTracingExpirationTime(DateTime requestTracingExpirationTime) { + this.requestTracingExpirationTime = requestTracingExpirationTime; + return this; + } + + /** + * Get the remoteDebuggingEnabled value. + * + * @return the remoteDebuggingEnabled value + */ + public Boolean remoteDebuggingEnabled() { + return this.remoteDebuggingEnabled; + } + + /** + * Set the remoteDebuggingEnabled value. + * + * @param remoteDebuggingEnabled the remoteDebuggingEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withRemoteDebuggingEnabled(Boolean remoteDebuggingEnabled) { + this.remoteDebuggingEnabled = remoteDebuggingEnabled; + return this; + } + + /** + * Get the remoteDebuggingVersion value. + * + * @return the remoteDebuggingVersion value + */ + public String remoteDebuggingVersion() { + return this.remoteDebuggingVersion; + } + + /** + * Set the remoteDebuggingVersion value. + * + * @param remoteDebuggingVersion the remoteDebuggingVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withRemoteDebuggingVersion(String remoteDebuggingVersion) { + this.remoteDebuggingVersion = remoteDebuggingVersion; + return this; + } + + /** + * Get the httpLoggingEnabled value. + * + * @return the httpLoggingEnabled value + */ + public Boolean httpLoggingEnabled() { + return this.httpLoggingEnabled; + } + + /** + * Set the httpLoggingEnabled value. + * + * @param httpLoggingEnabled the httpLoggingEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withHttpLoggingEnabled(Boolean httpLoggingEnabled) { + this.httpLoggingEnabled = httpLoggingEnabled; + return this; + } + + /** + * Get the logsDirectorySizeLimit value. + * + * @return the logsDirectorySizeLimit value + */ + public Integer logsDirectorySizeLimit() { + return this.logsDirectorySizeLimit; + } + + /** + * Set the logsDirectorySizeLimit value. + * + * @param logsDirectorySizeLimit the logsDirectorySizeLimit value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withLogsDirectorySizeLimit(Integer logsDirectorySizeLimit) { + this.logsDirectorySizeLimit = logsDirectorySizeLimit; + return this; + } + + /** + * Get the detailedErrorLoggingEnabled value. + * + * @return the detailedErrorLoggingEnabled value + */ + public Boolean detailedErrorLoggingEnabled() { + return this.detailedErrorLoggingEnabled; + } + + /** + * Set the detailedErrorLoggingEnabled value. + * + * @param detailedErrorLoggingEnabled the detailedErrorLoggingEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withDetailedErrorLoggingEnabled(Boolean detailedErrorLoggingEnabled) { + this.detailedErrorLoggingEnabled = detailedErrorLoggingEnabled; + return this; + } + + /** + * Get the publishingUsername value. + * + * @return the publishingUsername value + */ + public String publishingUsername() { + return this.publishingUsername; + } + + /** + * Set the publishingUsername value. + * + * @param publishingUsername the publishingUsername value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withPublishingUsername(String publishingUsername) { + this.publishingUsername = publishingUsername; + 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 SiteConfig object itself. + */ + public SiteConfig withAppSettings(List appSettings) { + this.appSettings = appSettings; + 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 SiteConfig object itself. + */ + public SiteConfig withConnectionStrings(List connectionStrings) { + this.connectionStrings = connectionStrings; + return this; + } + + /** + * Get the machineKey value. + * + * @return the machineKey value + */ + public SiteMachineKey machineKey() { + return this.machineKey; + } + + /** + * Get the handlerMappings value. + * + * @return the handlerMappings value + */ + public List handlerMappings() { + return this.handlerMappings; + } + + /** + * Set the handlerMappings value. + * + * @param handlerMappings the handlerMappings value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withHandlerMappings(List handlerMappings) { + this.handlerMappings = handlerMappings; + return this; + } + + /** + * Get the documentRoot value. + * + * @return the documentRoot value + */ + public String documentRoot() { + return this.documentRoot; + } + + /** + * Set the documentRoot value. + * + * @param documentRoot the documentRoot value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withDocumentRoot(String documentRoot) { + this.documentRoot = documentRoot; + return this; + } + + /** + * Get the scmType value. + * + * @return the scmType value + */ + public ScmType scmType() { + return this.scmType; + } + + /** + * Set the scmType value. + * + * @param scmType the scmType value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withScmType(ScmType scmType) { + this.scmType = scmType; + return this; + } + + /** + * Get the use32BitWorkerProcess value. + * + * @return the use32BitWorkerProcess value + */ + public Boolean use32BitWorkerProcess() { + return this.use32BitWorkerProcess; + } + + /** + * Set the use32BitWorkerProcess value. + * + * @param use32BitWorkerProcess the use32BitWorkerProcess value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withUse32BitWorkerProcess(Boolean use32BitWorkerProcess) { + this.use32BitWorkerProcess = use32BitWorkerProcess; + return this; + } + + /** + * Get the webSocketsEnabled value. + * + * @return the webSocketsEnabled value + */ + public Boolean webSocketsEnabled() { + return this.webSocketsEnabled; + } + + /** + * Set the webSocketsEnabled value. + * + * @param webSocketsEnabled the webSocketsEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withWebSocketsEnabled(Boolean webSocketsEnabled) { + this.webSocketsEnabled = webSocketsEnabled; + return this; + } + + /** + * Get the alwaysOn value. + * + * @return the alwaysOn value + */ + public Boolean alwaysOn() { + return this.alwaysOn; + } + + /** + * Set the alwaysOn value. + * + * @param alwaysOn the alwaysOn value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAlwaysOn(Boolean alwaysOn) { + this.alwaysOn = alwaysOn; + return this; + } + + /** + * Get the javaVersion value. + * + * @return the javaVersion value + */ + public String javaVersion() { + return this.javaVersion; + } + + /** + * Set the javaVersion value. + * + * @param javaVersion the javaVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withJavaVersion(String javaVersion) { + this.javaVersion = javaVersion; + return this; + } + + /** + * Get the javaContainer value. + * + * @return the javaContainer value + */ + public String javaContainer() { + return this.javaContainer; + } + + /** + * Set the javaContainer value. + * + * @param javaContainer the javaContainer value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withJavaContainer(String javaContainer) { + this.javaContainer = javaContainer; + return this; + } + + /** + * Get the javaContainerVersion value. + * + * @return the javaContainerVersion value + */ + public String javaContainerVersion() { + return this.javaContainerVersion; + } + + /** + * Set the javaContainerVersion value. + * + * @param javaContainerVersion the javaContainerVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withJavaContainerVersion(String javaContainerVersion) { + this.javaContainerVersion = 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 SiteConfig object itself. + */ + public SiteConfig withAppCommandLine(String appCommandLine) { + this.appCommandLine = appCommandLine; + return this; + } + + /** + * Get the managedPipelineMode value. + * + * @return the managedPipelineMode value + */ + public ManagedPipelineMode managedPipelineMode() { + return this.managedPipelineMode; + } + + /** + * Set the managedPipelineMode value. + * + * @param managedPipelineMode the managedPipelineMode value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withManagedPipelineMode(ManagedPipelineMode managedPipelineMode) { + this.managedPipelineMode = managedPipelineMode; + return this; + } + + /** + * Get the virtualApplications value. + * + * @return the virtualApplications value + */ + public List virtualApplications() { + return this.virtualApplications; + } + + /** + * Set the virtualApplications value. + * + * @param virtualApplications the virtualApplications value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withVirtualApplications(List virtualApplications) { + this.virtualApplications = virtualApplications; + return this; + } + + /** + * Get the loadBalancing value. + * + * @return the loadBalancing value + */ + public SiteLoadBalancing loadBalancing() { + return this.loadBalancing; + } + + /** + * Set the loadBalancing value. + * + * @param loadBalancing the loadBalancing value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withLoadBalancing(SiteLoadBalancing loadBalancing) { + this.loadBalancing = loadBalancing; + return this; + } + + /** + * Get the experiments value. + * + * @return the experiments value + */ + public Experiments experiments() { + return this.experiments; + } + + /** + * Set the experiments value. + * + * @param experiments the experiments value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withExperiments(Experiments experiments) { + this.experiments = experiments; + return this; + } + + /** + * Get the limits value. + * + * @return the limits value + */ + public SiteLimits limits() { + return this.limits; + } + + /** + * Set the limits value. + * + * @param limits the limits value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withLimits(SiteLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get the autoHealEnabled value. + * + * @return the autoHealEnabled value + */ + public Boolean autoHealEnabled() { + return this.autoHealEnabled; + } + + /** + * Set the autoHealEnabled value. + * + * @param autoHealEnabled the autoHealEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAutoHealEnabled(Boolean autoHealEnabled) { + this.autoHealEnabled = autoHealEnabled; + return this; + } + + /** + * Get the autoHealRules value. + * + * @return the autoHealRules value + */ + public AutoHealRules autoHealRules() { + return this.autoHealRules; + } + + /** + * Set the autoHealRules value. + * + * @param autoHealRules the autoHealRules value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAutoHealRules(AutoHealRules autoHealRules) { + this.autoHealRules = autoHealRules; + return this; + } + + /** + * Get the tracingOptions value. + * + * @return the tracingOptions value + */ + public String tracingOptions() { + return this.tracingOptions; + } + + /** + * Set the tracingOptions value. + * + * @param tracingOptions the tracingOptions value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withTracingOptions(String tracingOptions) { + this.tracingOptions = tracingOptions; + return this; + } + + /** + * Get the vnetName value. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the vnetName value. + * + * @param vnetName the vnetName value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the cors value. + * + * @return the cors value + */ + public CorsSettings cors() { + return this.cors; + } + + /** + * Set the cors value. + * + * @param cors the cors value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withCors(CorsSettings cors) { + this.cors = 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 SiteConfig object itself. + */ + public SiteConfig withPush(PushSettingsInner push) { + this.push = push; + return this; + } + + /** + * Get the apiDefinition value. + * + * @return the apiDefinition value + */ + public ApiDefinitionInfo apiDefinition() { + return this.apiDefinition; + } + + /** + * Set the apiDefinition value. + * + * @param apiDefinition the apiDefinition value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withApiDefinition(ApiDefinitionInfo apiDefinition) { + this.apiDefinition = apiDefinition; + return this; + } + + /** + * Get the autoSwapSlotName value. + * + * @return the autoSwapSlotName value + */ + public String autoSwapSlotName() { + return this.autoSwapSlotName; + } + + /** + * Set the autoSwapSlotName value. + * + * @param autoSwapSlotName the autoSwapSlotName value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAutoSwapSlotName(String autoSwapSlotName) { + this.autoSwapSlotName = autoSwapSlotName; + return this; + } + + /** + * Get the localMySqlEnabled value. + * + * @return the localMySqlEnabled value + */ + public Boolean localMySqlEnabled() { + return this.localMySqlEnabled; + } + + /** + * Set the localMySqlEnabled value. + * + * @param localMySqlEnabled the localMySqlEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withLocalMySqlEnabled(Boolean localMySqlEnabled) { + this.localMySqlEnabled = localMySqlEnabled; + return this; + } + + /** + * Get the ipSecurityRestrictions value. + * + * @return the ipSecurityRestrictions value + */ + public List ipSecurityRestrictions() { + return this.ipSecurityRestrictions; + } + + /** + * Set the ipSecurityRestrictions value. + * + * @param ipSecurityRestrictions the ipSecurityRestrictions value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withIpSecurityRestrictions(List ipSecurityRestrictions) { + this.ipSecurityRestrictions = ipSecurityRestrictions; + return this; + } + + /** + * Get the http20Enabled value. + * + * @return the http20Enabled value + */ + public Boolean http20Enabled() { + return this.http20Enabled; + } + + /** + * Set the http20Enabled value. + * + * @param http20Enabled the http20Enabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withHttp20Enabled(Boolean http20Enabled) { + this.http20Enabled = http20Enabled; + return this; + } + + /** + * Get the minTlsVersion value. + * + * @return the minTlsVersion value + */ + public SupportedTlsVersions minTlsVersion() { + return this.minTlsVersion; + } + + /** + * Set the minTlsVersion value. + * + * @param minTlsVersion the minTlsVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withMinTlsVersion(SupportedTlsVersions minTlsVersion) { + this.minTlsVersion = minTlsVersion; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteExtensionType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteExtensionType.java new file mode 100644 index 00000000000..a17bf88a4bc --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteExtensionType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SiteExtensionType. + */ +public enum SiteExtensionType { + /** Enum value Gallery. */ + GALLERY("Gallery"), + + /** Enum value WebRoot. */ + WEB_ROOT("WebRoot"); + + /** The actual serialized value for a SiteExtensionType instance. */ + private String value; + + SiteExtensionType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SiteExtensionType instance. + * + * @param value the serialized value to parse. + * @return the parsed SiteExtensionType object, or null if unable to parse. + */ + @JsonCreator + public static SiteExtensionType fromString(String value) { + SiteExtensionType[] items = SiteExtensionType.values(); + for (SiteExtensionType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteLimits.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteLimits.java new file mode 100644 index 00000000000..91672ee837e --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteLimits.java @@ -0,0 +1,95 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metric limits set on an app. + */ +public class SiteLimits { + /** + * Maximum allowed CPU usage percentage. + */ + @JsonProperty(value = "maxPercentageCpu") + private Double maxPercentageCpu; + + /** + * Maximum allowed memory usage in MB. + */ + @JsonProperty(value = "maxMemoryInMb") + private Long maxMemoryInMb; + + /** + * Maximum allowed disk size usage in MB. + */ + @JsonProperty(value = "maxDiskSizeInMb") + private Long maxDiskSizeInMb; + + /** + * Get the maxPercentageCpu value. + * + * @return the maxPercentageCpu value + */ + public Double maxPercentageCpu() { + return this.maxPercentageCpu; + } + + /** + * Set the maxPercentageCpu value. + * + * @param maxPercentageCpu the maxPercentageCpu value to set + * @return the SiteLimits object itself. + */ + public SiteLimits withMaxPercentageCpu(Double maxPercentageCpu) { + this.maxPercentageCpu = maxPercentageCpu; + return this; + } + + /** + * Get the maxMemoryInMb value. + * + * @return the maxMemoryInMb value + */ + public Long maxMemoryInMb() { + return this.maxMemoryInMb; + } + + /** + * Set the maxMemoryInMb value. + * + * @param maxMemoryInMb the maxMemoryInMb value to set + * @return the SiteLimits object itself. + */ + public SiteLimits withMaxMemoryInMb(Long maxMemoryInMb) { + this.maxMemoryInMb = maxMemoryInMb; + return this; + } + + /** + * Get the maxDiskSizeInMb value. + * + * @return the maxDiskSizeInMb value + */ + public Long maxDiskSizeInMb() { + return this.maxDiskSizeInMb; + } + + /** + * Set the maxDiskSizeInMb value. + * + * @param maxDiskSizeInMb the maxDiskSizeInMb value to set + * @return the SiteLimits object itself. + */ + public SiteLimits withMaxDiskSizeInMb(Long maxDiskSizeInMb) { + this.maxDiskSizeInMb = maxDiskSizeInMb; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteLoadBalancing.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteLoadBalancing.java new file mode 100644 index 00000000000..8a673628281 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteLoadBalancing.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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SiteLoadBalancing. + */ +public enum SiteLoadBalancing { + /** Enum value WeightedRoundRobin. */ + WEIGHTED_ROUND_ROBIN("WeightedRoundRobin"), + + /** Enum value LeastRequests. */ + LEAST_REQUESTS("LeastRequests"), + + /** Enum value LeastResponseTime. */ + LEAST_RESPONSE_TIME("LeastResponseTime"), + + /** Enum value WeightedTotalTraffic. */ + WEIGHTED_TOTAL_TRAFFIC("WeightedTotalTraffic"), + + /** Enum value RequestHash. */ + REQUEST_HASH("RequestHash"); + + /** The actual serialized value for a SiteLoadBalancing instance. */ + private String value; + + SiteLoadBalancing(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SiteLoadBalancing instance. + * + * @param value the serialized value to parse. + * @return the parsed SiteLoadBalancing object, or null if unable to parse. + */ + @JsonCreator + public static SiteLoadBalancing fromString(String value) { + SiteLoadBalancing[] items = SiteLoadBalancing.values(); + for (SiteLoadBalancing item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteMachineKey.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteMachineKey.java new file mode 100644 index 00000000000..41d0c7bf1f2 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SiteMachineKey.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * MachineKey of an app. + */ +public class SiteMachineKey { + /** + * MachineKey validation. + */ + @JsonProperty(value = "validation") + private String validation; + + /** + * Validation key. + */ + @JsonProperty(value = "validationKey") + private String validationKey; + + /** + * Algorithm used for decryption. + */ + @JsonProperty(value = "decryption") + private String decryption; + + /** + * Decryption key. + */ + @JsonProperty(value = "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-web/src/main/java/com/microsoft/azure/management/web/SkuCapacity.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SkuCapacity.java new file mode 100644 index 00000000000..a1f2ee37b68 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SkuCapacity.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of the App Service plan scale options. + */ +public class SkuCapacity { + /** + * Minimum number of workers for this App Service plan SKU. + */ + @JsonProperty(value = "minimum") + private Integer minimum; + + /** + * Maximum number of workers for this App Service plan SKU. + */ + @JsonProperty(value = "maximum") + private Integer maximum; + + /** + * Default number of workers for this App Service plan SKU. + */ + @JsonProperty(value = "default") + private Integer defaultProperty; + + /** + * Available scale configurations for an App Service plan. + */ + @JsonProperty(value = "scaleType") + private String scaleType; + + /** + * Get the minimum value. + * + * @return the minimum value + */ + public Integer minimum() { + return this.minimum; + } + + /** + * Set the minimum value. + * + * @param minimum the minimum value to set + * @return the SkuCapacity object itself. + */ + public SkuCapacity withMinimum(Integer minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get the maximum value. + * + * @return the maximum value + */ + public Integer maximum() { + return this.maximum; + } + + /** + * Set the maximum value. + * + * @param maximum the maximum value to set + * @return the SkuCapacity object itself. + */ + public SkuCapacity withMaximum(Integer maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get the defaultProperty value. + * + * @return the defaultProperty value + */ + public Integer defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty value. + * + * @param defaultProperty the defaultProperty value to set + * @return the SkuCapacity object itself. + */ + public SkuCapacity withDefaultProperty(Integer defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the scaleType value. + * + * @return the scaleType value + */ + public String scaleType() { + return this.scaleType; + } + + /** + * Set the scaleType value. + * + * @param scaleType the scaleType value to set + * @return the SkuCapacity object itself. + */ + public SkuCapacity withScaleType(String scaleType) { + this.scaleType = scaleType; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SkuDescription.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SkuDescription.java new file mode 100644 index 00000000000..336a33ca613 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SkuDescription.java @@ -0,0 +1,254 @@ +/** + * 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.web; + +import java.util.List; +import com.microsoft.azure.management.web.implementation.CapabilityInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of a SKU for a scalable resource. + */ +public class SkuDescription { + /** + * Name of the resource SKU. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Service tier of the resource SKU. + */ + @JsonProperty(value = "tier") + private String tier; + + /** + * Size specifier of the resource SKU. + */ + @JsonProperty(value = "size") + private String size; + + /** + * Family code of the resource SKU. + */ + @JsonProperty(value = "family") + private String family; + + /** + * Shared or dedicated app hosting. Possible values include: 'Shared', + * 'Dedicated', 'Dynamic'. + */ + @JsonProperty(value = "computeMode") + private ComputeModeOptions computeMode; + + /** + * Current number of instances assigned to the resource. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * Min, max, and default scale values of the SKU. + */ + @JsonProperty(value = "skuCapacity") + private SkuCapacity skuCapacity; + + /** + * Locations of the SKU. + */ + @JsonProperty(value = "locations") + private List locations; + + /** + * Capabilities of the SKU, e.g., is traffic manager enabled?. + */ + @JsonProperty(value = "capabilities") + private List capabilities; + + /** + * 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 SkuDescription object itself. + */ + public SkuDescription withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier value. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier value. + * + * @param tier the tier value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get the size value. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Set the size value. + * + * @param size the size value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the family value. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set the family value. + * + * @param family the family value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the computeMode value. + * + * @return the computeMode value + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Set the computeMode value. + * + * @param computeMode the computeMode value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withComputeMode(ComputeModeOptions computeMode) { + this.computeMode = computeMode; + 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 SkuDescription object itself. + */ + public SkuDescription withCapacity(Integer capacity) { + this.capacity = 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-web/src/main/java/com/microsoft/azure/management/web/SkuName.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SkuName.java new file mode 100644 index 00000000000..44f7a7272fc --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SkuName.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.web; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SkuName. + */ +public final class SkuName extends ExpandableStringEnum { + /** Static value Free for SkuName. */ + public static final SkuName FREE = fromString("Free"); + + /** Static value Shared for SkuName. */ + public static final SkuName SHARED = fromString("Shared"); + + /** Static value Basic for SkuName. */ + public static final SkuName BASIC = fromString("Basic"); + + /** Static value Standard for SkuName. */ + public static final SkuName STANDARD = fromString("Standard"); + + /** Static value Premium for SkuName. */ + public static final SkuName PREMIUM = fromString("Premium"); + + /** Static value PremiumV2 for SkuName. */ + public static final SkuName PREMIUM_V2 = fromString("PremiumV2"); + + /** Static value Dynamic for SkuName. */ + public static final SkuName DYNAMIC = fromString("Dynamic"); + + /** Static value Isolated for SkuName. */ + public static final SkuName ISOLATED = fromString("Isolated"); + + /** + * Creates or finds a SkuName from its string representation. + * @param name a name to look for + * @return the corresponding SkuName + */ + @JsonCreator + public static SkuName fromString(String name) { + return fromString(name, SkuName.class); + } + + /** + * @return known SkuName values + */ + public static Collection values() { + return values(SkuName.class); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SlotSwapStatus.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SlotSwapStatus.java new file mode 100644 index 00000000000..72c851beb3f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SlotSwapStatus.java @@ -0,0 +1,63 @@ +/** + * 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.web; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The status of the last successfull slot swap operation. + */ +public class SlotSwapStatus { + /** + * The time the last successful slot swap completed. + */ + @JsonProperty(value = "timestampUtc", access = JsonProperty.Access.WRITE_ONLY) + private DateTime timestampUtc; + + /** + * The source slot of the last swap operation. + */ + @JsonProperty(value = "sourceSlotName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceSlotName; + + /** + * The destination slot of the last swap operation. + */ + @JsonProperty(value = "destinationSlotName", access = JsonProperty.Access.WRITE_ONLY) + private String destinationSlotName; + + /** + * Get the timestampUtc value. + * + * @return the timestampUtc value + */ + public DateTime timestampUtc() { + return this.timestampUtc; + } + + /** + * Get the sourceSlotName value. + * + * @return the sourceSlotName value + */ + public String sourceSlotName() { + return this.sourceSlotName; + } + + /** + * Get the destinationSlotName value. + * + * @return the destinationSlotName value + */ + public String destinationSlotName() { + return this.destinationSlotName; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SlowRequestsBasedTrigger.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SlowRequestsBasedTrigger.java new file mode 100644 index 00000000000..ee00fec79fe --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SlowRequestsBasedTrigger.java @@ -0,0 +1,95 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Trigger based on request execution time. + */ +public class SlowRequestsBasedTrigger { + /** + * Time taken. + */ + @JsonProperty(value = "timeTaken") + private String timeTaken; + + /** + * Request Count. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * Time interval. + */ + @JsonProperty(value = "timeInterval") + private String timeInterval; + + /** + * Get the timeTaken value. + * + * @return the timeTaken value + */ + public String timeTaken() { + return this.timeTaken; + } + + /** + * Set the timeTaken value. + * + * @param timeTaken the timeTaken value to set + * @return the SlowRequestsBasedTrigger object itself. + */ + public SlowRequestsBasedTrigger withTimeTaken(String timeTaken) { + this.timeTaken = timeTaken; + return this; + } + + /** + * Get the count value. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set the count value. + * + * @param count the count value to set + * @return the SlowRequestsBasedTrigger object itself. + */ + public SlowRequestsBasedTrigger withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the timeInterval value. + * + * @return the timeInterval value + */ + public String timeInterval() { + return this.timeInterval; + } + + /** + * Set the timeInterval value. + * + * @param timeInterval the timeInterval value to set + * @return the SlowRequestsBasedTrigger object itself. + */ + public SlowRequestsBasedTrigger withTimeInterval(String timeInterval) { + this.timeInterval = timeInterval; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SnapshotRecoveryTarget.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SnapshotRecoveryTarget.java new file mode 100644 index 00000000000..bf0442ce2e6 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SnapshotRecoveryTarget.java @@ -0,0 +1,74 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifies the web app that snapshot contents will be written to. + */ +public class SnapshotRecoveryTarget { + /** + * Geographical location of the target web app, e.g. SouthEastAsia, + * SouthCentralUS. + */ + @JsonProperty(value = "location") + private String location; + + /** + * ARM resource ID of the target app. + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} + * for production slots and + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + * for other slots. + */ + @JsonProperty(value = "id") + private String id; + + /** + * 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 SnapshotRecoveryTarget object itself. + */ + public SnapshotRecoveryTarget withLocation(String location) { + this.location = location; + return this; + } + + /** + * 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 SnapshotRecoveryTarget object itself. + */ + public SnapshotRecoveryTarget withId(String id) { + this.id = id; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Solution.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Solution.java new file mode 100644 index 00000000000..ab7606b7de3 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/Solution.java @@ -0,0 +1,201 @@ +/** + * 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.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class Representing Solution for problems detected. + */ +public class Solution { + /** + * Solution Id. + */ + @JsonProperty(value = "id") + private Double id; + + /** + * Display Name of the solution. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Order of the solution. + */ + @JsonProperty(value = "order") + private Double order; + + /** + * Description of the solution. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Type of Solution. Possible values include: 'QuickSolution', + * 'DeepInvestigation', 'BestPractices'. + */ + @JsonProperty(value = "type") + private SolutionType type; + + /** + * Solution Data. + */ + @JsonProperty(value = "data") + private List> data; + + /** + * Solution Metadata. + */ + @JsonProperty(value = "metadata") + private List> metadata; + + /** + * Get the id value. + * + * @return the id value + */ + public Double id() { + return this.id; + } + + /** + * Set the id value. + * + * @param id the id value to set + * @return the Solution object itself. + */ + public Solution withId(Double id) { + this.id = id; + return this; + } + + /** + * Get the displayName value. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName value. + * + * @param displayName the displayName value to set + * @return the Solution object itself. + */ + public Solution withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the order value. + * + * @return the order value + */ + public Double order() { + return this.order; + } + + /** + * Set the order value. + * + * @param order the order value to set + * @return the Solution object itself. + */ + public Solution withOrder(Double order) { + this.order = order; + return this; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the Solution object itself. + */ + public Solution withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public SolutionType type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the Solution object itself. + */ + public Solution withType(SolutionType type) { + this.type = type; + return this; + } + + /** + * Get the data value. + * + * @return the data value + */ + public List> data() { + return this.data; + } + + /** + * Set the data value. + * + * @param data the data value to set + * @return the Solution object itself. + */ + public Solution withData(List> data) { + this.data = data; + return this; + } + + /** + * 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 Solution object itself. + */ + public Solution withMetadata(List> metadata) { + this.metadata = metadata; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SolutionType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SolutionType.java new file mode 100644 index 00000000000..871f72ce062 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SolutionType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SolutionType. + */ +public enum SolutionType { + /** Enum value QuickSolution. */ + QUICK_SOLUTION("QuickSolution"), + + /** Enum value DeepInvestigation. */ + DEEP_INVESTIGATION("DeepInvestigation"), + + /** Enum value BestPractices. */ + BEST_PRACTICES("BestPractices"); + + /** The actual serialized value for a SolutionType instance. */ + private String value; + + SolutionType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SolutionType instance. + * + * @param value the serialized value to parse. + * @return the parsed SolutionType object, or null if unable to parse. + */ + @JsonCreator + public static SolutionType fromString(String value) { + SolutionType[] items = SolutionType.values(); + for (SolutionType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SslState.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SslState.java new file mode 100644 index 00000000000..79f80ff38ca --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SslState.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SslState. + */ +public enum SslState { + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value SniEnabled. */ + SNI_ENABLED("SniEnabled"), + + /** Enum value IpBasedEnabled. */ + IP_BASED_ENABLED("IpBasedEnabled"); + + /** The actual serialized value for a SslState instance. */ + private String value; + + SslState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SslState instance. + * + * @param value the serialized value to parse. + * @return the parsed SslState object, or null if unable to parse. + */ + @JsonCreator + public static SslState fromString(String value) { + SslState[] items = SslState.values(); + for (SslState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StackMajorVersion.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StackMajorVersion.java new file mode 100644 index 00000000000..73d107a6d44 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StackMajorVersion.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application stack major version. + */ +public class StackMajorVersion { + /** + * Application stack major version (display only). + */ + @JsonProperty(value = "displayVersion") + private String displayVersion; + + /** + * Application stack major version (runtime only). + */ + @JsonProperty(value = "runtimeVersion") + private String runtimeVersion; + + /** + * <code>true</code> if this is the default major version; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "isDefault") + private Boolean isDefault; + + /** + * Minor versions associated with the major version. + */ + @JsonProperty(value = "minorVersions") + private List minorVersions; + + /** + * Get the displayVersion value. + * + * @return the displayVersion value + */ + public String displayVersion() { + return this.displayVersion; + } + + /** + * Set the displayVersion value. + * + * @param displayVersion the displayVersion value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withDisplayVersion(String displayVersion) { + this.displayVersion = displayVersion; + return this; + } + + /** + * Get the runtimeVersion value. + * + * @return the runtimeVersion value + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion value. + * + * @param runtimeVersion the runtimeVersion value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get the isDefault value. + * + * @return the isDefault value + */ + public Boolean isDefault() { + return this.isDefault; + } + + /** + * Set the isDefault value. + * + * @param isDefault the isDefault value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get the minorVersions value. + * + * @return the minorVersions value + */ + public List minorVersions() { + return this.minorVersions; + } + + /** + * Set the minorVersions value. + * + * @param minorVersions the minorVersions value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withMinorVersions(List minorVersions) { + this.minorVersions = minorVersions; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StackMinorVersion.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StackMinorVersion.java new file mode 100644 index 00000000000..d924746740f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StackMinorVersion.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application stack minor version. + */ +public class StackMinorVersion { + /** + * Application stack minor version (display only). + */ + @JsonProperty(value = "displayVersion") + private String displayVersion; + + /** + * Application stack minor version (runtime only). + */ + @JsonProperty(value = "runtimeVersion") + private String runtimeVersion; + + /** + * <code>true</code> if this is the default minor version; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "isDefault") + private Boolean isDefault; + + /** + * Get the displayVersion value. + * + * @return the displayVersion value + */ + public String displayVersion() { + return this.displayVersion; + } + + /** + * Set the displayVersion value. + * + * @param displayVersion the displayVersion value to set + * @return the StackMinorVersion object itself. + */ + public StackMinorVersion withDisplayVersion(String displayVersion) { + this.displayVersion = displayVersion; + return this; + } + + /** + * Get the runtimeVersion value. + * + * @return the runtimeVersion value + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion value. + * + * @param runtimeVersion the runtimeVersion value to set + * @return the StackMinorVersion object itself. + */ + public StackMinorVersion withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get the isDefault value. + * + * @return the isDefault value + */ + public Boolean isDefault() { + return this.isDefault; + } + + /** + * Set the isDefault value. + * + * @param isDefault the isDefault value to set + * @return the StackMinorVersion object itself. + */ + public StackMinorVersion withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StatusCodesBasedTrigger.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StatusCodesBasedTrigger.java new file mode 100644 index 00000000000..3d8bec1552c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StatusCodesBasedTrigger.java @@ -0,0 +1,147 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Trigger based on status code. + */ +public class StatusCodesBasedTrigger { + /** + * HTTP status code. + */ + @JsonProperty(value = "status") + private Integer status; + + /** + * Request Sub Status. + */ + @JsonProperty(value = "subStatus") + private Integer subStatus; + + /** + * Win32 error code. + */ + @JsonProperty(value = "win32Status") + private Integer win32Status; + + /** + * Request Count. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * Time interval. + */ + @JsonProperty(value = "timeInterval") + private String timeInterval; + + /** + * Get the status value. + * + * @return the status value + */ + public Integer status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withStatus(Integer status) { + this.status = status; + return this; + } + + /** + * Get the subStatus value. + * + * @return the subStatus value + */ + public Integer subStatus() { + return this.subStatus; + } + + /** + * Set the subStatus value. + * + * @param subStatus the subStatus value to set + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withSubStatus(Integer subStatus) { + this.subStatus = subStatus; + return this; + } + + /** + * Get the win32Status value. + * + * @return the win32Status value + */ + public Integer win32Status() { + return this.win32Status; + } + + /** + * Set the win32Status value. + * + * @param win32Status the win32Status value to set + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withWin32Status(Integer win32Status) { + this.win32Status = win32Status; + return this; + } + + /** + * Get the count value. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set the count value. + * + * @param count the count value to set + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the timeInterval value. + * + * @return the timeInterval value + */ + public String timeInterval() { + return this.timeInterval; + } + + /** + * Set the timeInterval value. + * + * @param timeInterval the timeInterval value to set + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withTimeInterval(String timeInterval) { + this.timeInterval = timeInterval; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StatusOptions.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StatusOptions.java new file mode 100644 index 00000000000..a2e009b2aad --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/StatusOptions.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for StatusOptions. + */ +public enum StatusOptions { + /** Enum value Ready. */ + READY("Ready"), + + /** Enum value Pending. */ + PENDING("Pending"), + + /** Enum value Creating. */ + CREATING("Creating"); + + /** The actual serialized value for a StatusOptions instance. */ + private String value; + + StatusOptions(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a StatusOptions instance. + * + * @param value the serialized value to parse. + * @return the parsed StatusOptions object, or null if unable to parse. + */ + @JsonCreator + public static StatusOptions fromString(String value) { + StatusOptions[] items = StatusOptions.values(); + for (StatusOptions item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SupportedTlsVersions.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SupportedTlsVersions.java new file mode 100644 index 00000000000..e2361955772 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/SupportedTlsVersions.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SupportedTlsVersions. + */ +public final class SupportedTlsVersions extends ExpandableStringEnum { + /** Static value 1.0 for SupportedTlsVersions. */ + public static final SupportedTlsVersions ONE_FULL_STOP_ZERO = fromString("1.0"); + + /** Static value 1.1 for SupportedTlsVersions. */ + public static final SupportedTlsVersions ONE_FULL_STOP_ONE = fromString("1.1"); + + /** Static value 1.2 for SupportedTlsVersions. */ + public static final SupportedTlsVersions ONE_FULL_STOP_TWO = fromString("1.2"); + + /** + * Creates or finds a SupportedTlsVersions from its string representation. + * @param name a name to look for + * @return the corresponding SupportedTlsVersions + */ + @JsonCreator + public static SupportedTlsVersions fromString(String name) { + return fromString(name, SupportedTlsVersions.class); + } + + /** + * @return known SupportedTlsVersions values + */ + public static Collection values() { + return values(SupportedTlsVersions.class); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/TriggeredJobRun.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/TriggeredJobRun.java new file mode 100644 index 00000000000..229e36d39ea --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/TriggeredJobRun.java @@ -0,0 +1,295 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Triggered Web Job Run Information. + */ +@JsonFlatten +public class TriggeredJobRun extends ProxyOnlyResource { + /** + * Job ID. + */ + @JsonProperty(value = "properties.id") + private String triggeredJobRunId; + + /** + * Job name. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private String triggeredJobRunName; + + /** + * Job status. Possible values include: 'Success', 'Failed', 'Error'. + */ + @JsonProperty(value = "properties.status") + private TriggeredWebJobStatus status; + + /** + * Start time. + */ + @JsonProperty(value = "properties.startTime") + private DateTime startTime; + + /** + * End time. + */ + @JsonProperty(value = "properties.endTime") + private DateTime endTime; + + /** + * Job duration. + */ + @JsonProperty(value = "properties.duration") + private String duration; + + /** + * Output URL. + */ + @JsonProperty(value = "properties.outputUrl") + private String outputUrl; + + /** + * Error URL. + */ + @JsonProperty(value = "properties.errorUrl") + private String errorUrl; + + /** + * Job URL. + */ + @JsonProperty(value = "properties.url") + private String url; + + /** + * Job name. + */ + @JsonProperty(value = "properties.jobName") + private String jobName; + + /** + * Job trigger. + */ + @JsonProperty(value = "properties.trigger") + private String trigger; + + /** + * Get the triggeredJobRunId value. + * + * @return the triggeredJobRunId value + */ + public String triggeredJobRunId() { + return this.triggeredJobRunId; + } + + /** + * Set the triggeredJobRunId value. + * + * @param triggeredJobRunId the triggeredJobRunId value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withTriggeredJobRunId(String triggeredJobRunId) { + this.triggeredJobRunId = triggeredJobRunId; + return this; + } + + /** + * Get the triggeredJobRunName value. + * + * @return the triggeredJobRunName value + */ + public String triggeredJobRunName() { + return this.triggeredJobRunName; + } + + /** + * Get the status value. + * + * @return the status value + */ + public TriggeredWebJobStatus status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withStatus(TriggeredWebJobStatus status) { + this.status = status; + 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 TriggeredJobRun object itself. + */ + public TriggeredJobRun 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 TriggeredJobRun object itself. + */ + public TriggeredJobRun withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the duration value. + * + * @return the duration value + */ + public String duration() { + return this.duration; + } + + /** + * Set the duration value. + * + * @param duration the duration value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withDuration(String duration) { + this.duration = duration; + return this; + } + + /** + * Get the outputUrl value. + * + * @return the outputUrl value + */ + public String outputUrl() { + return this.outputUrl; + } + + /** + * Set the outputUrl value. + * + * @param outputUrl the outputUrl value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withOutputUrl(String outputUrl) { + this.outputUrl = outputUrl; + return this; + } + + /** + * Get the errorUrl value. + * + * @return the errorUrl value + */ + public String errorUrl() { + return this.errorUrl; + } + + /** + * Set the errorUrl value. + * + * @param errorUrl the errorUrl value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withErrorUrl(String errorUrl) { + this.errorUrl = errorUrl; + return this; + } + + /** + * Get the url value. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set the url value. + * + * @param url the url value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the jobName value. + * + * @return the jobName value + */ + public String jobName() { + return this.jobName; + } + + /** + * Set the jobName value. + * + * @param jobName the jobName value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withJobName(String jobName) { + this.jobName = jobName; + return this; + } + + /** + * Get the trigger value. + * + * @return the trigger value + */ + public String trigger() { + return this.trigger; + } + + /** + * Set the trigger value. + * + * @param trigger the trigger value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withTrigger(String trigger) { + this.trigger = trigger; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/TriggeredWebJobStatus.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/TriggeredWebJobStatus.java new file mode 100644 index 00000000000..b75ca479bf8 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/TriggeredWebJobStatus.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for TriggeredWebJobStatus. + */ +public enum TriggeredWebJobStatus { + /** Enum value Success. */ + SUCCESS("Success"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Error. */ + ERROR("Error"); + + /** The actual serialized value for a TriggeredWebJobStatus instance. */ + private String value; + + TriggeredWebJobStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a TriggeredWebJobStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed TriggeredWebJobStatus object, or null if unable to parse. + */ + @JsonCreator + public static TriggeredWebJobStatus fromString(String value) { + TriggeredWebJobStatus[] items = TriggeredWebJobStatus.values(); + for (TriggeredWebJobStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/UnauthenticatedClientAction.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/UnauthenticatedClientAction.java new file mode 100644 index 00000000000..7eb4415af2e --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/UnauthenticatedClientAction.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UnauthenticatedClientAction. + */ +public enum UnauthenticatedClientAction { + /** Enum value RedirectToLoginPage. */ + REDIRECT_TO_LOGIN_PAGE("RedirectToLoginPage"), + + /** Enum value AllowAnonymous. */ + ALLOW_ANONYMOUS("AllowAnonymous"); + + /** The actual serialized value for a UnauthenticatedClientAction instance. */ + private String value; + + UnauthenticatedClientAction(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UnauthenticatedClientAction instance. + * + * @param value the serialized value to parse. + * @return the parsed UnauthenticatedClientAction object, or null if unable to parse. + */ + @JsonCreator + public static UnauthenticatedClientAction fromString(String value) { + UnauthenticatedClientAction[] items = UnauthenticatedClientAction.values(); + for (UnauthenticatedClientAction item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/UsageState.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/UsageState.java new file mode 100644 index 00000000000..3b424330576 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/UsageState.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UsageState. + */ +public enum UsageState { + /** Enum value Normal. */ + NORMAL("Normal"), + + /** Enum value Exceeded. */ + EXCEEDED("Exceeded"); + + /** The actual serialized value for a UsageState instance. */ + private String value; + + UsageState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UsageState instance. + * + * @param value the serialized value to parse. + * @return the parsed UsageState object, or null if unable to parse. + */ + @JsonCreator + public static UsageState fromString(String value) { + UsageState[] items = UsageState.values(); + for (UsageState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ValidateResourceTypes.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ValidateResourceTypes.java new file mode 100644 index 00000000000..d8b9cb21f36 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ValidateResourceTypes.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ValidateResourceTypes. + */ +public final class ValidateResourceTypes extends ExpandableStringEnum { + /** Static value ServerFarm for ValidateResourceTypes. */ + public static final ValidateResourceTypes SERVER_FARM = fromString("ServerFarm"); + + /** Static value Site for ValidateResourceTypes. */ + public static final ValidateResourceTypes SITE = fromString("Site"); + + /** + * Creates or finds a ValidateResourceTypes from its string representation. + * @param name a name to look for + * @return the corresponding ValidateResourceTypes + */ + @JsonCreator + public static ValidateResourceTypes fromString(String name) { + return fromString(name, ValidateResourceTypes.class); + } + + /** + * @return known ValidateResourceTypes values + */ + public static Collection values() { + return values(ValidateResourceTypes.class); + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ValidateResponseError.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ValidateResponseError.java new file mode 100644 index 00000000000..bb9dadb2f5f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/ValidateResponseError.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error details for when validation fails. + */ +public class ValidateResponseError { + /** + * Validation error code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Validation error message. + */ + @JsonProperty(value = "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-web/src/main/java/com/microsoft/azure/management/web/VirtualApplication.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VirtualApplication.java new file mode 100644 index 00000000000..7a633bbcb41 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VirtualApplication.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Virtual application in an app. + */ +public class VirtualApplication { + /** + * Virtual path. + */ + @JsonProperty(value = "virtualPath") + private String virtualPath; + + /** + * Physical path. + */ + @JsonProperty(value = "physicalPath") + private String physicalPath; + + /** + * <code>true</code> if preloading is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "preloadEnabled") + private Boolean preloadEnabled; + + /** + * Virtual directories for virtual application. + */ + @JsonProperty(value = "virtualDirectories") + private List virtualDirectories; + + /** + * Get the virtualPath value. + * + * @return the virtualPath value + */ + public String virtualPath() { + return this.virtualPath; + } + + /** + * Set the virtualPath value. + * + * @param virtualPath the virtualPath value to set + * @return the VirtualApplication object itself. + */ + public VirtualApplication withVirtualPath(String virtualPath) { + this.virtualPath = virtualPath; + return this; + } + + /** + * Get the physicalPath value. + * + * @return the physicalPath value + */ + public String physicalPath() { + return this.physicalPath; + } + + /** + * Set the physicalPath value. + * + * @param physicalPath the physicalPath value to set + * @return the VirtualApplication object itself. + */ + public VirtualApplication withPhysicalPath(String physicalPath) { + this.physicalPath = physicalPath; + return this; + } + + /** + * Get the preloadEnabled value. + * + * @return the preloadEnabled value + */ + public Boolean preloadEnabled() { + return this.preloadEnabled; + } + + /** + * Set the preloadEnabled value. + * + * @param preloadEnabled the preloadEnabled value to set + * @return the VirtualApplication object itself. + */ + public VirtualApplication withPreloadEnabled(Boolean preloadEnabled) { + this.preloadEnabled = preloadEnabled; + return this; + } + + /** + * Get the virtualDirectories value. + * + * @return the virtualDirectories value + */ + public List virtualDirectories() { + return this.virtualDirectories; + } + + /** + * Set the virtualDirectories value. + * + * @param virtualDirectories the virtualDirectories value to set + * @return the VirtualApplication object itself. + */ + public VirtualApplication withVirtualDirectories(List virtualDirectories) { + this.virtualDirectories = virtualDirectories; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VirtualDirectory.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VirtualDirectory.java new file mode 100644 index 00000000000..b23f7170f34 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VirtualDirectory.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Directory for virtual application. + */ +public class VirtualDirectory { + /** + * Path to virtual application. + */ + @JsonProperty(value = "virtualPath") + private String virtualPath; + + /** + * Physical path. + */ + @JsonProperty(value = "physicalPath") + private String physicalPath; + + /** + * Get the virtualPath value. + * + * @return the virtualPath value + */ + public String virtualPath() { + return this.virtualPath; + } + + /** + * Set the virtualPath value. + * + * @param virtualPath the virtualPath value to set + * @return the VirtualDirectory object itself. + */ + public VirtualDirectory withVirtualPath(String virtualPath) { + this.virtualPath = virtualPath; + return this; + } + + /** + * Get the physicalPath value. + * + * @return the physicalPath value + */ + public String physicalPath() { + return this.physicalPath; + } + + /** + * Set the physicalPath value. + * + * @param physicalPath the physicalPath value to set + * @return the VirtualDirectory object itself. + */ + public VirtualDirectory withPhysicalPath(String physicalPath) { + this.physicalPath = physicalPath; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VirtualIPMapping.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VirtualIPMapping.java new file mode 100644 index 00000000000..ec7b47201a1 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VirtualIPMapping.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Virtual IP mapping. + */ +public class VirtualIPMapping { + /** + * Virtual IP address. + */ + @JsonProperty(value = "virtualIP") + private String virtualIP; + + /** + * Internal HTTP port. + */ + @JsonProperty(value = "internalHttpPort") + private Integer internalHttpPort; + + /** + * Internal HTTPS port. + */ + @JsonProperty(value = "internalHttpsPort") + private Integer internalHttpsPort; + + /** + * Is virtual IP mapping in use. + */ + @JsonProperty(value = "inUse") + private Boolean inUse; + + /** + * Get the virtualIP value. + * + * @return the virtualIP value + */ + public String virtualIP() { + return this.virtualIP; + } + + /** + * Set the virtualIP value. + * + * @param virtualIP the virtualIP value to set + * @return the VirtualIPMapping object itself. + */ + public VirtualIPMapping withVirtualIP(String virtualIP) { + this.virtualIP = virtualIP; + return this; + } + + /** + * Get the internalHttpPort value. + * + * @return the internalHttpPort value + */ + public Integer internalHttpPort() { + return this.internalHttpPort; + } + + /** + * Set the internalHttpPort value. + * + * @param internalHttpPort the internalHttpPort value to set + * @return the VirtualIPMapping object itself. + */ + public VirtualIPMapping withInternalHttpPort(Integer internalHttpPort) { + this.internalHttpPort = internalHttpPort; + return this; + } + + /** + * Get the internalHttpsPort value. + * + * @return the internalHttpsPort value + */ + public Integer internalHttpsPort() { + return this.internalHttpsPort; + } + + /** + * Set the internalHttpsPort value. + * + * @param internalHttpsPort the internalHttpsPort value to set + * @return the VirtualIPMapping object itself. + */ + public VirtualIPMapping withInternalHttpsPort(Integer internalHttpsPort) { + this.internalHttpsPort = internalHttpsPort; + return this; + } + + /** + * Get the inUse value. + * + * @return the inUse value + */ + public Boolean inUse() { + return this.inUse; + } + + /** + * Set the inUse value. + * + * @param inUse the inUse value to set + * @return the VirtualIPMapping object itself. + */ + public VirtualIPMapping withInUse(Boolean inUse) { + this.inUse = inUse; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VirtualNetworkProfile.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VirtualNetworkProfile.java new file mode 100644 index 00000000000..77199a2389d --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VirtualNetworkProfile.java @@ -0,0 +1,99 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specification for using a Virtual Network. + */ +public class VirtualNetworkProfile { + /** + * Resource id of the Virtual Network. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Name of the Virtual Network (read-only). + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Resource type of the Virtual Network (read-only). + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Subnet within the Virtual Network. + */ + @JsonProperty(value = "subnet") + private String subnet; + + /** + * 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 VirtualNetworkProfile object itself. + */ + public VirtualNetworkProfile withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the subnet value. + * + * @return the subnet value + */ + public String subnet() { + return this.subnet; + } + + /** + * Set the subnet value. + * + * @param subnet the subnet value to set + * @return the VirtualNetworkProfile object itself. + */ + public VirtualNetworkProfile withSubnet(String subnet) { + this.subnet = subnet; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VnetValidationTestFailure.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VnetValidationTestFailure.java new file mode 100644 index 00000000000..437d1ee9bbf --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/VnetValidationTestFailure.java @@ -0,0 +1,72 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * A class that describes a test that failed during NSG and UDR validation. + */ +@JsonFlatten +public class VnetValidationTestFailure extends ProxyOnlyResource { + /** + * The name of the test that failed. + */ + @JsonProperty(value = "properties.testName") + private String testName; + + /** + * The details of what caused the failure, e.g. the blocking rule name, + * etc. + */ + @JsonProperty(value = "properties.details") + private String details; + + /** + * Get the testName value. + * + * @return the testName value + */ + public String testName() { + return this.testName; + } + + /** + * Set the testName value. + * + * @param testName the testName value to set + * @return the VnetValidationTestFailure object itself. + */ + public VnetValidationTestFailure withTestName(String testName) { + this.testName = testName; + return this; + } + + /** + * Get the details value. + * + * @return the details value + */ + public String details() { + return this.details; + } + + /** + * Set the details value. + * + * @param details the details value to set + * @return the VnetValidationTestFailure object itself. + */ + public VnetValidationTestFailure withDetails(String details) { + this.details = details; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/WebJobType.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/WebJobType.java new file mode 100644 index 00000000000..6d92e8d4183 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/WebJobType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for WebJobType. + */ +public enum WebJobType { + /** Enum value Continuous. */ + CONTINUOUS("Continuous"), + + /** Enum value Triggered. */ + TRIGGERED("Triggered"); + + /** The actual serialized value for a WebJobType instance. */ + private String value; + + WebJobType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a WebJobType instance. + * + * @param value the serialized value to parse. + * @return the parsed WebJobType object, or null if unable to parse. + */ + @JsonCreator + public static WebJobType fromString(String value) { + WebJobType[] items = WebJobType.values(); + for (WebJobType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/WorkerPool.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/WorkerPool.java new file mode 100644 index 00000000000..61877077b82 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/WorkerPool.java @@ -0,0 +1,138 @@ +/** + * 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.web; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Worker pool of an App Service Environment. + */ +public class WorkerPool { + /** + * Worker size ID for referencing this worker pool. + */ + @JsonProperty(value = "workerSizeId") + private Integer workerSizeId; + + /** + * Shared or dedicated app hosting. Possible values include: 'Shared', + * 'Dedicated', 'Dynamic'. + */ + @JsonProperty(value = "computeMode") + private ComputeModeOptions computeMode; + + /** + * VM size of the worker pool instances. + */ + @JsonProperty(value = "workerSize") + private String workerSize; + + /** + * Number of instances in the worker pool. + */ + @JsonProperty(value = "workerCount") + private Integer workerCount; + + /** + * Names of all instances in the worker pool (read only). + */ + @JsonProperty(value = "instanceNames", access = JsonProperty.Access.WRITE_ONLY) + private List instanceNames; + + /** + * Get the workerSizeId value. + * + * @return the workerSizeId value + */ + public Integer workerSizeId() { + return this.workerSizeId; + } + + /** + * Set the workerSizeId value. + * + * @param workerSizeId the workerSizeId value to set + * @return the WorkerPool object itself. + */ + public WorkerPool withWorkerSizeId(Integer workerSizeId) { + this.workerSizeId = workerSizeId; + return this; + } + + /** + * Get the computeMode value. + * + * @return the computeMode value + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Set the computeMode value. + * + * @param computeMode the computeMode value to set + * @return the WorkerPool object itself. + */ + public WorkerPool withComputeMode(ComputeModeOptions computeMode) { + this.computeMode = computeMode; + return this; + } + + /** + * Get the workerSize value. + * + * @return the workerSize value + */ + public String workerSize() { + return this.workerSize; + } + + /** + * Set the workerSize value. + * + * @param workerSize the workerSize value to set + * @return the WorkerPool object itself. + */ + public WorkerPool withWorkerSize(String workerSize) { + this.workerSize = workerSize; + return this; + } + + /** + * Get the workerCount value. + * + * @return the workerCount value + */ + public Integer workerCount() { + return this.workerCount; + } + + /** + * Set the workerCount value. + * + * @param workerCount the workerCount value to set + * @return the WorkerPool object itself. + */ + public WorkerPool withWorkerCount(Integer workerCount) { + this.workerCount = workerCount; + return this; + } + + /** + * Get the instanceNames value. + * + * @return the instanceNames value + */ + public List instanceNames() { + return this.instanceNames; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/WorkerSizeOptions.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/WorkerSizeOptions.java new file mode 100644 index 00000000000..a5197614f89 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/WorkerSizeOptions.java @@ -0,0 +1,68 @@ +/** + * 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.web; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for WorkerSizeOptions. + */ +public enum WorkerSizeOptions { + /** Enum value Default. */ + DEFAULT("Default"), + + /** Enum value Small. */ + SMALL("Small"), + + /** Enum value Medium. */ + MEDIUM("Medium"), + + /** Enum value Large. */ + LARGE("Large"), + + /** Enum value D1. */ + D1("D1"), + + /** Enum value D2. */ + D2("D2"), + + /** Enum value D3. */ + D3("D3"); + + /** The actual serialized value for a WorkerSizeOptions instance. */ + private String value; + + WorkerSizeOptions(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a WorkerSizeOptions instance. + * + * @param value the serialized value to parse. + * @return the parsed WorkerSizeOptions object, or null if unable to parse. + */ + @JsonCreator + public static WorkerSizeOptions fromString(String value) { + WorkerSizeOptions[] items = WorkerSizeOptions.values(); + for (WorkerSizeOptions item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AddressResponseInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AddressResponseInner.java new file mode 100644 index 00000000000..70118c78db7 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AddressResponseInner.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.web.implementation; + +import java.util.List; +import com.microsoft.azure.management.web.VirtualIPMapping; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes main public IP address and any extra virtual IPs. + */ +public class AddressResponseInner { + /** + * Main public virtual IP. + */ + @JsonProperty(value = "serviceIpAddress") + private String serviceIpAddress; + + /** + * Virtual Network internal IP address of the App Service Environment if it + * is in internal load-balancing mode. + */ + @JsonProperty(value = "internalIpAddress") + private String internalIpAddress; + + /** + * IP addresses appearing on outbound connections. + */ + @JsonProperty(value = "outboundIpAddresses") + private List outboundIpAddresses; + + /** + * Additional virtual IPs. + */ + @JsonProperty(value = "vipMappings") + private List vipMappings; + + /** + * Get the serviceIpAddress value. + * + * @return the serviceIpAddress value + */ + public String serviceIpAddress() { + return this.serviceIpAddress; + } + + /** + * Set the serviceIpAddress value. + * + * @param serviceIpAddress the serviceIpAddress value to set + * @return the AddressResponseInner object itself. + */ + public AddressResponseInner withServiceIpAddress(String serviceIpAddress) { + this.serviceIpAddress = serviceIpAddress; + return this; + } + + /** + * Get the internalIpAddress value. + * + * @return the internalIpAddress value + */ + public String internalIpAddress() { + return this.internalIpAddress; + } + + /** + * Set the internalIpAddress value. + * + * @param internalIpAddress the internalIpAddress value to set + * @return the AddressResponseInner object itself. + */ + public AddressResponseInner withInternalIpAddress(String internalIpAddress) { + this.internalIpAddress = internalIpAddress; + return this; + } + + /** + * Get the outboundIpAddresses value. + * + * @return the outboundIpAddresses value + */ + public List outboundIpAddresses() { + return this.outboundIpAddresses; + } + + /** + * Set the outboundIpAddresses value. + * + * @param outboundIpAddresses the outboundIpAddresses value to set + * @return the AddressResponseInner object itself. + */ + public AddressResponseInner withOutboundIpAddresses(List outboundIpAddresses) { + this.outboundIpAddresses = outboundIpAddresses; + return this; + } + + /** + * Get the vipMappings value. + * + * @return the vipMappings value + */ + public List vipMappings() { + return this.vipMappings; + } + + /** + * Set the vipMappings value. + * + * @param vipMappings the vipMappings value to set + * @return the AddressResponseInner object itself. + */ + public AddressResponseInner withVipMappings(List vipMappings) { + this.vipMappings = vipMappings; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AnalysisDefinitionInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AnalysisDefinitionInner.java new file mode 100644 index 00000000000..cff010296ac --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AnalysisDefinitionInner.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Definition of Analysis. + */ +@JsonFlatten +public class AnalysisDefinitionInner extends ProxyOnlyResource { + /** + * Description of the Analysis. + */ + @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateOrderInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateOrderInner.java new file mode 100644 index 00000000000..fa32affa43b --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateOrderInner.java @@ -0,0 +1,397 @@ +/** + * 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.web.implementation; + +import java.util.Map; +import com.microsoft.azure.management.web.AppServiceCertificate; +import com.microsoft.azure.management.web.CertificateProductType; +import com.microsoft.azure.management.web.ProvisioningState; +import com.microsoft.azure.management.web.CertificateOrderStatus; +import com.microsoft.azure.management.web.CertificateDetails; +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * SSL certificate purchase order. + */ +@JsonFlatten +public class AppServiceCertificateOrderInner extends Resource { + /** + * State of the Key Vault secret. + */ + @JsonProperty(value = "properties.certificates") + private Map certificates; + + /** + * Certificate distinguished name. + */ + @JsonProperty(value = "properties.distinguishedName") + private String distinguishedName; + + /** + * Domain verification token. + */ + @JsonProperty(value = "properties.domainVerificationToken", access = JsonProperty.Access.WRITE_ONLY) + private String domainVerificationToken; + + /** + * Duration in years (must be between 1 and 3). + */ + @JsonProperty(value = "properties.validityInYears") + private Integer validityInYears; + + /** + * Certificate key size. + */ + @JsonProperty(value = "properties.keySize") + private Integer keySize; + + /** + * Certificate product type. Possible values include: + * 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'. + */ + @JsonProperty(value = "properties.productType", required = true) + private CertificateProductType productType; + + /** + * <code>true</code> if the certificate should be automatically + * renewed when it expires; otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.autoRenew") + private Boolean autoRenew; + + /** + * Status of certificate order. Possible values include: 'Succeeded', + * 'Failed', 'Canceled', 'InProgress', 'Deleting'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Current order status. Possible values include: 'Pendingissuance', + * 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', + * 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private CertificateOrderStatus status; + + /** + * Signed certificate. + */ + @JsonProperty(value = "properties.signedCertificate", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails signedCertificate; + + /** + * Last CSR that was created for this order. + */ + @JsonProperty(value = "properties.csr") + private String csr; + + /** + * Intermediate certificate. + */ + @JsonProperty(value = "properties.intermediate", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails intermediate; + + /** + * Root certificate. + */ + @JsonProperty(value = "properties.root", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails root; + + /** + * Current serial number of the certificate. + */ + @JsonProperty(value = "properties.serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /** + * Certificate last issuance time. + */ + @JsonProperty(value = "properties.lastCertificateIssuanceTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastCertificateIssuanceTime; + + /** + * Certificate expiration time. + */ + @JsonProperty(value = "properties.expirationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime expirationTime; + + /** + * <code>true</code> if private key is external; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.isPrivateKeyExternal", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isPrivateKeyExternal; + + /** + * Reasons why App Service Certificate is not renewable at the current + * moment. + */ + @JsonProperty(value = "properties.appServiceCertificateNotRenewableReasons", access = JsonProperty.Access.WRITE_ONLY) + private List appServiceCertificateNotRenewableReasons; + + /** + * Time stamp when the certificate would be auto renewed next. + */ + @JsonProperty(value = "properties.nextAutoRenewalTimeStamp", access = JsonProperty.Access.WRITE_ONLY) + private DateTime nextAutoRenewalTimeStamp; + + /** + * Get the certificates value. + * + * @return the certificates value + */ + public Map certificates() { + return this.certificates; + } + + /** + * Set the certificates value. + * + * @param certificates the certificates value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withCertificates(Map certificates) { + this.certificates = certificates; + return this; + } + + /** + * Get the distinguishedName value. + * + * @return the distinguishedName value + */ + public String distinguishedName() { + return this.distinguishedName; + } + + /** + * Set the distinguishedName value. + * + * @param distinguishedName the distinguishedName value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withDistinguishedName(String distinguishedName) { + this.distinguishedName = distinguishedName; + return this; + } + + /** + * Get the domainVerificationToken value. + * + * @return the domainVerificationToken value + */ + public String domainVerificationToken() { + return this.domainVerificationToken; + } + + /** + * Get the validityInYears value. + * + * @return the validityInYears value + */ + public Integer validityInYears() { + return this.validityInYears; + } + + /** + * Set the validityInYears value. + * + * @param validityInYears the validityInYears value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withValidityInYears(Integer validityInYears) { + this.validityInYears = validityInYears; + return this; + } + + /** + * Get the keySize value. + * + * @return the keySize value + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set the keySize value. + * + * @param keySize the keySize value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withKeySize(Integer keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get the productType value. + * + * @return the productType value + */ + public CertificateProductType productType() { + return this.productType; + } + + /** + * Set the productType value. + * + * @param productType the productType value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withProductType(CertificateProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get the autoRenew value. + * + * @return the autoRenew value + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set the autoRenew value. + * + * @param autoRenew the autoRenew value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status value. + * + * @return the status value + */ + public CertificateOrderStatus status() { + return this.status; + } + + /** + * Get the signedCertificate value. + * + * @return the signedCertificate value + */ + public CertificateDetails signedCertificate() { + return this.signedCertificate; + } + + /** + * 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 AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get the intermediate value. + * + * @return the intermediate value + */ + public CertificateDetails intermediate() { + return this.intermediate; + } + + /** + * Get the root value. + * + * @return the root value + */ + public CertificateDetails root() { + return this.root; + } + + /** + * Get the serialNumber value. + * + * @return the serialNumber value + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the lastCertificateIssuanceTime value. + * + * @return the lastCertificateIssuanceTime value + */ + public DateTime lastCertificateIssuanceTime() { + return this.lastCertificateIssuanceTime; + } + + /** + * Get the expirationTime value. + * + * @return the expirationTime value + */ + public DateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get the isPrivateKeyExternal value. + * + * @return the isPrivateKeyExternal value + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Get the appServiceCertificateNotRenewableReasons value. + * + * @return the appServiceCertificateNotRenewableReasons value + */ + public List appServiceCertificateNotRenewableReasons() { + return this.appServiceCertificateNotRenewableReasons; + } + + /** + * Get the nextAutoRenewalTimeStamp value. + * + * @return the nextAutoRenewalTimeStamp value + */ + public DateTime nextAutoRenewalTimeStamp() { + return this.nextAutoRenewalTimeStamp; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateOrderPatchResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateOrderPatchResourceInner.java new file mode 100644 index 00000000000..b31d7c21c96 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateOrderPatchResourceInner.java @@ -0,0 +1,397 @@ +/** + * 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.web.implementation; + +import java.util.Map; +import com.microsoft.azure.management.web.AppServiceCertificate; +import com.microsoft.azure.management.web.CertificateProductType; +import com.microsoft.azure.management.web.ProvisioningState; +import com.microsoft.azure.management.web.CertificateOrderStatus; +import com.microsoft.azure.management.web.CertificateDetails; +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * ARM resource for a certificate order that is purchased through Azure. + */ +@JsonFlatten +public class AppServiceCertificateOrderPatchResourceInner extends ProxyOnlyResource { + /** + * State of the Key Vault secret. + */ + @JsonProperty(value = "properties.certificates") + private Map certificates; + + /** + * Certificate distinguished name. + */ + @JsonProperty(value = "properties.distinguishedName") + private String distinguishedName; + + /** + * Domain verification token. + */ + @JsonProperty(value = "properties.domainVerificationToken", access = JsonProperty.Access.WRITE_ONLY) + private String domainVerificationToken; + + /** + * Duration in years (must be between 1 and 3). + */ + @JsonProperty(value = "properties.validityInYears") + private Integer validityInYears; + + /** + * Certificate key size. + */ + @JsonProperty(value = "properties.keySize") + private Integer keySize; + + /** + * Certificate product type. Possible values include: + * 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'. + */ + @JsonProperty(value = "properties.productType", required = true) + private CertificateProductType productType; + + /** + * <code>true</code> if the certificate should be automatically + * renewed when it expires; otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.autoRenew") + private Boolean autoRenew; + + /** + * Status of certificate order. Possible values include: 'Succeeded', + * 'Failed', 'Canceled', 'InProgress', 'Deleting'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Current order status. Possible values include: 'Pendingissuance', + * 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', + * 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private CertificateOrderStatus status; + + /** + * Signed certificate. + */ + @JsonProperty(value = "properties.signedCertificate", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails signedCertificate; + + /** + * Last CSR that was created for this order. + */ + @JsonProperty(value = "properties.csr") + private String csr; + + /** + * Intermediate certificate. + */ + @JsonProperty(value = "properties.intermediate", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails intermediate; + + /** + * Root certificate. + */ + @JsonProperty(value = "properties.root", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails root; + + /** + * Current serial number of the certificate. + */ + @JsonProperty(value = "properties.serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /** + * Certificate last issuance time. + */ + @JsonProperty(value = "properties.lastCertificateIssuanceTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastCertificateIssuanceTime; + + /** + * Certificate expiration time. + */ + @JsonProperty(value = "properties.expirationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime expirationTime; + + /** + * <code>true</code> if private key is external; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.isPrivateKeyExternal", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isPrivateKeyExternal; + + /** + * Reasons why App Service Certificate is not renewable at the current + * moment. + */ + @JsonProperty(value = "properties.appServiceCertificateNotRenewableReasons", access = JsonProperty.Access.WRITE_ONLY) + private List appServiceCertificateNotRenewableReasons; + + /** + * Time stamp when the certificate would be auto renewed next. + */ + @JsonProperty(value = "properties.nextAutoRenewalTimeStamp", access = JsonProperty.Access.WRITE_ONLY) + private DateTime nextAutoRenewalTimeStamp; + + /** + * Get the certificates value. + * + * @return the certificates value + */ + public Map certificates() { + return this.certificates; + } + + /** + * Set the certificates value. + * + * @param certificates the certificates value to set + * @return the AppServiceCertificateOrderPatchResourceInner object itself. + */ + public AppServiceCertificateOrderPatchResourceInner withCertificates(Map certificates) { + this.certificates = certificates; + return this; + } + + /** + * Get the distinguishedName value. + * + * @return the distinguishedName value + */ + public String distinguishedName() { + return this.distinguishedName; + } + + /** + * Set the distinguishedName value. + * + * @param distinguishedName the distinguishedName value to set + * @return the AppServiceCertificateOrderPatchResourceInner object itself. + */ + public AppServiceCertificateOrderPatchResourceInner withDistinguishedName(String distinguishedName) { + this.distinguishedName = distinguishedName; + return this; + } + + /** + * Get the domainVerificationToken value. + * + * @return the domainVerificationToken value + */ + public String domainVerificationToken() { + return this.domainVerificationToken; + } + + /** + * Get the validityInYears value. + * + * @return the validityInYears value + */ + public Integer validityInYears() { + return this.validityInYears; + } + + /** + * Set the validityInYears value. + * + * @param validityInYears the validityInYears value to set + * @return the AppServiceCertificateOrderPatchResourceInner object itself. + */ + public AppServiceCertificateOrderPatchResourceInner withValidityInYears(Integer validityInYears) { + this.validityInYears = validityInYears; + return this; + } + + /** + * Get the keySize value. + * + * @return the keySize value + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set the keySize value. + * + * @param keySize the keySize value to set + * @return the AppServiceCertificateOrderPatchResourceInner object itself. + */ + public AppServiceCertificateOrderPatchResourceInner withKeySize(Integer keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get the productType value. + * + * @return the productType value + */ + public CertificateProductType productType() { + return this.productType; + } + + /** + * Set the productType value. + * + * @param productType the productType value to set + * @return the AppServiceCertificateOrderPatchResourceInner object itself. + */ + public AppServiceCertificateOrderPatchResourceInner withProductType(CertificateProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get the autoRenew value. + * + * @return the autoRenew value + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set the autoRenew value. + * + * @param autoRenew the autoRenew value to set + * @return the AppServiceCertificateOrderPatchResourceInner object itself. + */ + public AppServiceCertificateOrderPatchResourceInner withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status value. + * + * @return the status value + */ + public CertificateOrderStatus status() { + return this.status; + } + + /** + * Get the signedCertificate value. + * + * @return the signedCertificate value + */ + public CertificateDetails signedCertificate() { + return this.signedCertificate; + } + + /** + * 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 AppServiceCertificateOrderPatchResourceInner object itself. + */ + public AppServiceCertificateOrderPatchResourceInner withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get the intermediate value. + * + * @return the intermediate value + */ + public CertificateDetails intermediate() { + return this.intermediate; + } + + /** + * Get the root value. + * + * @return the root value + */ + public CertificateDetails root() { + return this.root; + } + + /** + * Get the serialNumber value. + * + * @return the serialNumber value + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the lastCertificateIssuanceTime value. + * + * @return the lastCertificateIssuanceTime value + */ + public DateTime lastCertificateIssuanceTime() { + return this.lastCertificateIssuanceTime; + } + + /** + * Get the expirationTime value. + * + * @return the expirationTime value + */ + public DateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get the isPrivateKeyExternal value. + * + * @return the isPrivateKeyExternal value + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Get the appServiceCertificateNotRenewableReasons value. + * + * @return the appServiceCertificateNotRenewableReasons value + */ + public List appServiceCertificateNotRenewableReasons() { + return this.appServiceCertificateNotRenewableReasons; + } + + /** + * Get the nextAutoRenewalTimeStamp value. + * + * @return the nextAutoRenewalTimeStamp value + */ + public DateTime nextAutoRenewalTimeStamp() { + return this.nextAutoRenewalTimeStamp; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateOrdersInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateOrdersInner.java new file mode 100644 index 00000000000..4d4a2338307 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateOrdersInner.java @@ -0,0 +1,2699 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AppServiceCertificateOrders. + */ +public class AppServiceCertificateOrdersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private AppServiceCertificateOrdersService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * 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 AppServiceCertificateOrdersInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(AppServiceCertificateOrdersService.class); + this.client = client; + } + + /** + * The interface defining all the services for AppServiceCertificateOrders to be + * used by Retrofit to perform actually REST calls. + */ + interface AppServiceCertificateOrdersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders list" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders validatePurchaseInformation" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders listByResourceGroup" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") + Observable> getByResourceGroup(@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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}", method = "DELETE", hasBody = true) + Observable> delete(@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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @Path("subscriptionId") String subscriptionId, @Body AppServiceCertificateOrderPatchResourceInner certificateDistinguishedName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders listCertificates" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders getCertificate" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders createOrUpdateCertificate" }) + @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 AppServiceCertificateResourceInner keyVaultCertificate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders beginCreateOrUpdateCertificate" }) + @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 AppServiceCertificateResourceInner keyVaultCertificate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders deleteCertificate" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders updateCertificate" }) + @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 AppServiceCertificatePatchResourceInner keyVaultCertificate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders reissue" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue") + Observable> reissue(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders renew" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew") + Observable> renew(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders resendEmail" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail") + Observable> resendEmail(@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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders resendRequestEmails" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails") + Observable> resendRequestEmails(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body NameIdentifierInner nameIdentifier, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders retrieveSiteSeal" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal") + Observable> retrieveSiteSeal(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @Path("subscriptionId") String subscriptionId, @Body SiteSealRequestInner siteSealRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders verifyDomainOwnership" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership") + Observable> verifyDomainOwnership(@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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders retrieveCertificateActions" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") + Observable> retrieveCertificateActions(@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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders retrieveCertificateEmailHistory" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceCertificateOrders listCertificatesNext" }) + @GET + Observable> listCertificatesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List all certificate orders in a subscription. + * List all certificate orders in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServiceCertificateOrderInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all certificate orders in a subscription. + * List all certificate orders in a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all certificate orders in a subscription. + * List all certificate orders in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * List all certificate orders in a subscription. + * List all certificate orders in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all certificate orders in a subscription. + * List all certificate orders in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 = "2015-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) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Validate information for a certificate order. + * Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void validatePurchaseInformation(AppServiceCertificateOrderInner appServiceCertificateOrder) { + validatePurchaseInformationWithServiceResponseAsync(appServiceCertificateOrder).toBlocking().single().body(); + } + + /** + * Validate information for a certificate order. + * Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture validatePurchaseInformationAsync(AppServiceCertificateOrderInner appServiceCertificateOrder, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(validatePurchaseInformationWithServiceResponseAsync(appServiceCertificateOrder), serviceCallback); + } + + /** + * Validate information for a certificate order. + * Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable validatePurchaseInformationAsync(AppServiceCertificateOrderInner appServiceCertificateOrder) { + return validatePurchaseInformationWithServiceResponseAsync(appServiceCertificateOrder).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Validate information for a certificate order. + * Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 = "2015-08-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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get certificate orders in a resource group. + * Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServiceCertificateOrderInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get certificate orders in a resource group. + * Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get certificate orders in a resource group. + * Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get certificate orders in a resource group. + * Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + 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 Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2015-08-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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a certificate order. + * Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceCertificateOrderInner object if successful. + */ + public AppServiceCertificateOrderInner getByResourceGroup(String resourceGroupName, String certificateOrderName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, certificateOrderName).toBlocking().single().body(); + } + + /** + * Get a certificate order. + * Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String certificateOrderName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, certificateOrderName), serviceCallback); + } + + /** + * Get a certificate order. + * Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateOrderInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String certificateOrderName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, certificateOrderName).map(new Func1, AppServiceCertificateOrderInner>() { + @Override + public AppServiceCertificateOrderInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a certificate order. + * Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateOrderInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2015-08-01"; + return service.getByResourceGroup(resourceGroupName, certificateOrderName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceCertificateOrderInner object if successful. + */ + public AppServiceCertificateOrderInner createOrUpdate(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderInner certificateDistinguishedName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).toBlocking().last().body(); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderInner certificateDistinguishedName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName), serviceCallback); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderInner certificateDistinguishedName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).map(new Func1, AppServiceCertificateOrderInner>() { + @Override + public AppServiceCertificateOrderInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderInner certificateDistinguishedName) { + 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 (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."); + } + Validator.validate(certificateDistinguishedName); + final String apiVersion = "2015-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, certificateOrderName, this.client.subscriptionId(), certificateDistinguishedName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceCertificateOrderInner object if successful. + */ + public AppServiceCertificateOrderInner beginCreateOrUpdate(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderInner certificateDistinguishedName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).toBlocking().single().body(); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderInner certificateDistinguishedName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName), serviceCallback); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateOrderInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderInner certificateDistinguishedName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).map(new Func1, AppServiceCertificateOrderInner>() { + @Override + public AppServiceCertificateOrderInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateOrderInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderInner certificateDistinguishedName) { + 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 (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."); + } + Validator.validate(certificateDistinguishedName); + final String apiVersion = "2015-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, certificateOrderName, this.client.subscriptionId(), certificateDistinguishedName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete an existing certificate order. + * Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String certificateOrderName) { + deleteWithServiceResponseAsync(resourceGroupName, certificateOrderName).toBlocking().single().body(); + } + + /** + * Delete an existing certificate order. + * Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String certificateOrderName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, certificateOrderName), serviceCallback); + } + + /** + * Delete an existing certificate order. + * Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String certificateOrderName) { + return deleteWithServiceResponseAsync(resourceGroupName, certificateOrderName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an existing certificate order. + * Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2015-08-01"; + return service.delete(resourceGroupName, certificateOrderName, 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceCertificateOrderInner object if successful. + */ + public AppServiceCertificateOrderInner update(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderPatchResourceInner certificateDistinguishedName) { + return updateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).toBlocking().single().body(); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderPatchResourceInner certificateDistinguishedName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName), serviceCallback); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateOrderInner object + */ + public Observable updateAsync(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderPatchResourceInner certificateDistinguishedName) { + return updateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).map(new Func1, AppServiceCertificateOrderInner>() { + @Override + public AppServiceCertificateOrderInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateOrderInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderPatchResourceInner certificateDistinguishedName) { + 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 (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."); + } + Validator.validate(certificateDistinguishedName); + final String apiVersion = "2015-08-01"; + return service.update(resourceGroupName, certificateOrderName, this.client.subscriptionId(), certificateDistinguishedName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List all certificates associated with a certificate order. + * List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServiceCertificateResourceInner> object if successful. + */ + public PagedList listCertificates(final String resourceGroupName, final String certificateOrderName) { + ServiceResponse> response = listCertificatesSinglePageAsync(resourceGroupName, certificateOrderName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all certificates associated with a certificate order. + * List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCertificatesAsync(final String resourceGroupName, final String certificateOrderName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listCertificatesSinglePageAsync(resourceGroupName, certificateOrderName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listCertificatesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all certificates associated with a certificate order. + * List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceCertificateResourceInner> object + */ + 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.body(); + } + }); + } + + /** + * List all certificates associated with a certificate order. + * List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceCertificateResourceInner> object + */ + 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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listCertificatesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all certificates associated with a certificate order. + * List all certificates associated with a certificate order. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AppServiceCertificateResourceInner> 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2015-08-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) { + try { + ServiceResponse> result = listCertificatesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCertificatesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the certificate associated with a certificate order. + * Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceCertificateResourceInner object if successful. + */ + public AppServiceCertificateResourceInner getCertificate(String resourceGroupName, String certificateOrderName, String name) { + return getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).toBlocking().single().body(); + } + + /** + * Get the certificate associated with a certificate order. + * Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getCertificateAsync(String resourceGroupName, String certificateOrderName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name), serviceCallback); + } + + /** + * Get the certificate associated with a certificate order. + * Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateResourceInner object + */ + public Observable getCertificateAsync(String resourceGroupName, String certificateOrderName, String name) { + return getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).map(new Func1, AppServiceCertificateResourceInner>() { + @Override + public AppServiceCertificateResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the certificate associated with a certificate order. + * Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateResourceInner object + */ + public Observable> getCertificateWithServiceResponseAsync(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."); + } + final String apiVersion = "2015-08-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) { + try { + ServiceResponse clientResponse = getCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceCertificateResourceInner object if successful. + */ + public AppServiceCertificateResourceInner createOrUpdateCertificate(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner keyVaultCertificate) { + return createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).toBlocking().last().body(); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner keyVaultCertificate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate), serviceCallback); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner keyVaultCertificate) { + return createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).map(new Func1, AppServiceCertificateResourceInner>() { + @Override + public AppServiceCertificateResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateCertificateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner 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 (keyVaultCertificate == null) { + throw new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null."); + } + Validator.validate(keyVaultCertificate); + final String apiVersion = "2015-08-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()); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceCertificateResourceInner object if successful. + */ + public AppServiceCertificateResourceInner beginCreateOrUpdateCertificate(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner keyVaultCertificate) { + return beginCreateOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).toBlocking().single().body(); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner keyVaultCertificate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate), serviceCallback); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateResourceInner object + */ + public Observable beginCreateOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner keyVaultCertificate) { + return beginCreateOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).map(new Func1, AppServiceCertificateResourceInner>() { + @Override + public AppServiceCertificateResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateResourceInner object + */ + public Observable> beginCreateOrUpdateCertificateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner 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 (keyVaultCertificate == null) { + throw new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null."); + } + Validator.validate(keyVaultCertificate); + final String apiVersion = "2015-08-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) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete the certificate associated with a certificate order. + * Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteCertificate(String resourceGroupName, String certificateOrderName, String name) { + deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).toBlocking().single().body(); + } + + /** + * Delete the certificate associated with a certificate order. + * Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteCertificateAsync(String resourceGroupName, String certificateOrderName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name), serviceCallback); + } + + /** + * Delete the certificate associated with a certificate order. + * Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteCertificateAsync(String resourceGroupName, String certificateOrderName, String name) { + return deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete the certificate associated with a certificate order. + * Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + final String apiVersion = "2015-08-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) { + try { + ServiceResponse clientResponse = deleteCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceCertificateResourceInner object if successful. + */ + public AppServiceCertificateResourceInner updateCertificate(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificatePatchResourceInner keyVaultCertificate) { + return updateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).toBlocking().single().body(); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificatePatchResourceInner keyVaultCertificate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate), serviceCallback); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateResourceInner object + */ + public Observable updateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificatePatchResourceInner keyVaultCertificate) { + return updateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).map(new Func1, AppServiceCertificateResourceInner>() { + @Override + public AppServiceCertificateResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceCertificateResourceInner object + */ + public Observable> updateCertificateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificatePatchResourceInner 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 (keyVaultCertificate == null) { + throw new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null."); + } + Validator.validate(keyVaultCertificate); + final String apiVersion = "2015-08-01"; + return service.updateCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), keyVaultCertificate, 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reissue an existing certificate order. + * Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void reissue(String resourceGroupName, String certificateOrderName, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest) { + reissueWithServiceResponseAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest).toBlocking().single().body(); + } + + /** + * Reissue an existing certificate order. + * Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture reissueAsync(String resourceGroupName, String certificateOrderName, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reissueWithServiceResponseAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest), serviceCallback); + } + + /** + * Reissue an existing certificate order. + * Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable reissueAsync(String resourceGroupName, String certificateOrderName, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest) { + return reissueWithServiceResponseAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reissue an existing certificate order. + * Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> reissueWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest) { + 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (reissueCertificateOrderRequest == null) { + throw new IllegalArgumentException("Parameter reissueCertificateOrderRequest is required and cannot be null."); + } + Validator.validate(reissueCertificateOrderRequest); + final String apiVersion = "2015-08-01"; + return service.reissue(resourceGroupName, certificateOrderName, this.client.subscriptionId(), reissueCertificateOrderRequest, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = reissueDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse reissueDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Renew an existing certificate order. + * Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void renew(String resourceGroupName, String certificateOrderName, RenewCertificateOrderRequestInner renewCertificateOrderRequest) { + renewWithServiceResponseAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest).toBlocking().single().body(); + } + + /** + * Renew an existing certificate order. + * Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture renewAsync(String resourceGroupName, String certificateOrderName, RenewCertificateOrderRequestInner renewCertificateOrderRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(renewWithServiceResponseAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest), serviceCallback); + } + + /** + * Renew an existing certificate order. + * Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable renewAsync(String resourceGroupName, String certificateOrderName, RenewCertificateOrderRequestInner renewCertificateOrderRequest) { + return renewWithServiceResponseAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Renew an existing certificate order. + * Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> renewWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, RenewCertificateOrderRequestInner renewCertificateOrderRequest) { + 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (renewCertificateOrderRequest == null) { + throw new IllegalArgumentException("Parameter renewCertificateOrderRequest is required and cannot be null."); + } + Validator.validate(renewCertificateOrderRequest); + final String apiVersion = "2015-08-01"; + return service.renew(resourceGroupName, certificateOrderName, 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Resend certificate email. + * Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resendEmail(String resourceGroupName, String certificateOrderName) { + resendEmailWithServiceResponseAsync(resourceGroupName, certificateOrderName).toBlocking().single().body(); + } + + /** + * Resend certificate email. + * Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resendEmailAsync(String resourceGroupName, String certificateOrderName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resendEmailWithServiceResponseAsync(resourceGroupName, certificateOrderName), serviceCallback); + } + + /** + * Resend certificate email. + * Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable resendEmailAsync(String resourceGroupName, String certificateOrderName) { + return resendEmailWithServiceResponseAsync(resourceGroupName, certificateOrderName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resend certificate email. + * Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> resendEmailWithServiceResponseAsync(String resourceGroupName, 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2015-08-01"; + return service.resendEmail(resourceGroupName, certificateOrderName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resendEmailDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resendEmailDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resendRequestEmails(String resourceGroupName, String certificateOrderName) { + resendRequestEmailsWithServiceResponseAsync(resourceGroupName, certificateOrderName).toBlocking().single().body(); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resendRequestEmailsAsync(String resourceGroupName, String certificateOrderName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resendRequestEmailsWithServiceResponseAsync(resourceGroupName, certificateOrderName), serviceCallback); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable resendRequestEmailsAsync(String resourceGroupName, String certificateOrderName) { + return resendRequestEmailsWithServiceResponseAsync(resourceGroupName, certificateOrderName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> resendRequestEmailsWithServiceResponseAsync(String resourceGroupName, 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2015-08-01"; + final String name = null; + NameIdentifierInner nameIdentifier = new NameIdentifierInner(); + nameIdentifier.withName(null); + return service.resendRequestEmails(resourceGroupName, certificateOrderName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), nameIdentifier, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resendRequestEmailsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resendRequestEmails(String resourceGroupName, String certificateOrderName, String name) { + resendRequestEmailsWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).toBlocking().single().body(); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the object. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resendRequestEmailsAsync(String resourceGroupName, String certificateOrderName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resendRequestEmailsWithServiceResponseAsync(resourceGroupName, certificateOrderName, name), serviceCallback); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable resendRequestEmailsAsync(String resourceGroupName, String certificateOrderName, String name) { + return resendRequestEmailsWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> resendRequestEmailsWithServiceResponseAsync(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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2015-08-01"; + NameIdentifierInner nameIdentifier = new NameIdentifierInner(); + nameIdentifier.withName(name); + return service.resendRequestEmails(resourceGroupName, certificateOrderName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), nameIdentifier, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resendRequestEmailsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resendRequestEmailsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteSealInner object if successful. + */ + public SiteSealInner retrieveSiteSeal(String resourceGroupName, String certificateOrderName, SiteSealRequestInner siteSealRequest) { + return retrieveSiteSealWithServiceResponseAsync(resourceGroupName, certificateOrderName, siteSealRequest).toBlocking().single().body(); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture retrieveSiteSealAsync(String resourceGroupName, String certificateOrderName, SiteSealRequestInner siteSealRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(retrieveSiteSealWithServiceResponseAsync(resourceGroupName, certificateOrderName, siteSealRequest), serviceCallback); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteSealInner object + */ + public Observable retrieveSiteSealAsync(String resourceGroupName, String certificateOrderName, SiteSealRequestInner siteSealRequest) { + return retrieveSiteSealWithServiceResponseAsync(resourceGroupName, certificateOrderName, siteSealRequest).map(new Func1, SiteSealInner>() { + @Override + public SiteSealInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteSealInner object + */ + public Observable> retrieveSiteSealWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, SiteSealRequestInner siteSealRequest) { + 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (siteSealRequest == null) { + throw new IllegalArgumentException("Parameter siteSealRequest is required and cannot be null."); + } + Validator.validate(siteSealRequest); + final String apiVersion = "2015-08-01"; + return service.retrieveSiteSeal(resourceGroupName, certificateOrderName, this.client.subscriptionId(), siteSealRequest, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = retrieveSiteSealDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse retrieveSiteSealDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void verifyDomainOwnership(String resourceGroupName, String certificateOrderName) { + verifyDomainOwnershipWithServiceResponseAsync(resourceGroupName, certificateOrderName).toBlocking().single().body(); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture verifyDomainOwnershipAsync(String resourceGroupName, String certificateOrderName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(verifyDomainOwnershipWithServiceResponseAsync(resourceGroupName, certificateOrderName), serviceCallback); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable verifyDomainOwnershipAsync(String resourceGroupName, String certificateOrderName) { + return verifyDomainOwnershipWithServiceResponseAsync(resourceGroupName, certificateOrderName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> verifyDomainOwnershipWithServiceResponseAsync(String resourceGroupName, 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2015-08-01"; + return service.verifyDomainOwnership(resourceGroupName, certificateOrderName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = verifyDomainOwnershipDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse verifyDomainOwnershipDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieve the list of certificate actions. + * Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<CertificateOrderActionInner> object if successful. + */ + public List retrieveCertificateActions(String resourceGroupName, String name) { + return retrieveCertificateActionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Retrieve the list of certificate actions. + * Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> retrieveCertificateActionsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(retrieveCertificateActionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Retrieve the list of certificate actions. + * Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CertificateOrderActionInner> object + */ + public Observable> retrieveCertificateActionsAsync(String resourceGroupName, String name) { + return retrieveCertificateActionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieve the list of certificate actions. + * Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CertificateOrderActionInner> object + */ + public Observable>> retrieveCertificateActionsWithServiceResponseAsync(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 = "2015-08-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) { + try { + ServiceResponse> clientResponse = retrieveCertificateActionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> retrieveCertificateActionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieve email history. + * Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<CertificateEmailInner> object if successful. + */ + public List retrieveCertificateEmailHistory(String resourceGroupName, String name) { + return retrieveCertificateEmailHistoryWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Retrieve email history. + * Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> retrieveCertificateEmailHistoryAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(retrieveCertificateEmailHistoryWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Retrieve email history. + * Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CertificateEmailInner> object + */ + public Observable> retrieveCertificateEmailHistoryAsync(String resourceGroupName, String name) { + return retrieveCertificateEmailHistoryWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieve email history. + * Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CertificateEmailInner> object + */ + public Observable>> retrieveCertificateEmailHistoryWithServiceResponseAsync(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 = "2015-08-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) { + try { + ServiceResponse> clientResponse = retrieveCertificateEmailHistoryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> retrieveCertificateEmailHistoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List all certificate orders in a subscription. + * List all certificate orders in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServiceCertificateOrderInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all certificate orders in a subscription. + * List all certificate orders in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all certificate orders in a subscription. + * List all certificate orders in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all certificate orders in a subscription. + * List all certificate orders in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all certificate orders in a subscription. + * List all certificate orders in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServiceCertificateOrderInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AppServiceCertificateOrderInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List all certificates associated with a certificate order. + * List all certificates associated with a certificate order. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServiceCertificateResourceInner> object if successful. + */ + public PagedList listCertificatesNext(final String nextPageLink) { + ServiceResponse> response = listCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all certificates associated with a certificate order. + * List all certificates associated with a certificate order. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCertificatesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listCertificatesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listCertificatesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all certificates associated with a certificate order. + * List all certificates associated with a certificate order. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceCertificateResourceInner> object + */ + public Observable> listCertificatesNextAsync(final String nextPageLink) { + return listCertificatesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all certificates associated with a certificate order. + * List all certificates associated with a certificate order. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceCertificateResourceInner> object + */ + public Observable>> listCertificatesNextWithServiceResponseAsync(final String nextPageLink) { + return listCertificatesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listCertificatesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all certificates associated with a certificate order. + * List all certificates associated with a certificate order. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AppServiceCertificateResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listCertificatesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listCertificatesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCertificatesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCertificatesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificatePatchResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificatePatchResourceInner.java new file mode 100644 index 00000000000..58834ed34db --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificatePatchResourceInner.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.microsoft.azure.management.web.KeyVaultSecretStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Key Vault container ARM resource for a certificate that is purchased through + * Azure. + */ +@JsonFlatten +public class AppServiceCertificatePatchResourceInner extends ProxyOnlyResource { + /** + * Key Vault resource Id. + */ + @JsonProperty(value = "properties.keyVaultId") + private String keyVaultId; + + /** + * Key Vault secret name. + */ + @JsonProperty(value = "properties.keyVaultSecretName") + private String keyVaultSecretName; + + /** + * Status of the Key Vault secret. Possible values include: 'Initialized', + * 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', + * 'OperationNotPermittedOnKeyVault', + * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', + * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', + * 'Unknown'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private KeyVaultSecretStatus provisioningState; + + /** + * Get the keyVaultId value. + * + * @return the keyVaultId value + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set the keyVaultId value. + * + * @param keyVaultId the keyVaultId value to set + * @return the AppServiceCertificatePatchResourceInner object itself. + */ + public AppServiceCertificatePatchResourceInner withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get the keyVaultSecretName value. + * + * @return the keyVaultSecretName value + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set the keyVaultSecretName value. + * + * @param keyVaultSecretName the keyVaultSecretName value to set + * @return the AppServiceCertificatePatchResourceInner object itself. + */ + public AppServiceCertificatePatchResourceInner withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public KeyVaultSecretStatus provisioningState() { + return this.provisioningState; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateResourceInner.java new file mode 100644 index 00000000000..c682587b114 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceCertificateResourceInner.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.microsoft.azure.management.web.KeyVaultSecretStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Key Vault container ARM resource for a certificate that is purchased through + * Azure. + */ +@JsonFlatten +public class AppServiceCertificateResourceInner extends Resource { + /** + * Key Vault resource Id. + */ + @JsonProperty(value = "properties.keyVaultId") + private String keyVaultId; + + /** + * Key Vault secret name. + */ + @JsonProperty(value = "properties.keyVaultSecretName") + private String keyVaultSecretName; + + /** + * Status of the Key Vault secret. Possible values include: 'Initialized', + * 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', + * 'OperationNotPermittedOnKeyVault', + * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', + * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', + * 'Unknown'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private KeyVaultSecretStatus provisioningState; + + /** + * Get the keyVaultId value. + * + * @return the keyVaultId value + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set the keyVaultId value. + * + * @param keyVaultId the keyVaultId value to set + * @return the AppServiceCertificateResourceInner object itself. + */ + public AppServiceCertificateResourceInner withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get the keyVaultSecretName value. + * + * @return the keyVaultSecretName value + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set the keyVaultSecretName value. + * + * @param keyVaultSecretName the keyVaultSecretName value to set + * @return the AppServiceCertificateResourceInner object itself. + */ + public AppServiceCertificateResourceInner withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public KeyVaultSecretStatus provisioningState() { + return this.provisioningState; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceEnvironmentPatchResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceEnvironmentPatchResourceInner.java new file mode 100644 index 00000000000..bb9a587b31a --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceEnvironmentPatchResourceInner.java @@ -0,0 +1,797 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.ProvisioningState; +import com.microsoft.azure.management.web.HostingEnvironmentStatus; +import com.microsoft.azure.management.web.VirtualNetworkProfile; +import com.microsoft.azure.management.web.InternalLoadBalancingMode; +import java.util.List; +import com.microsoft.azure.management.web.WorkerPool; +import com.microsoft.azure.management.web.VirtualIPMapping; +import com.microsoft.azure.management.web.NetworkAccessControlEntry; +import com.microsoft.azure.management.web.NameValuePair; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * ARM resource for a app service enviroment. + */ +@JsonFlatten +public class AppServiceEnvironmentPatchResourceInner extends ProxyOnlyResource { + /** + * Name of the App Service Environment. + */ + @JsonProperty(value = "properties.name", required = true) + private String appServiceEnvironmentPatchResourceName; + + /** + * Location of the App Service Environment, e.g. "West US". + */ + @JsonProperty(value = "properties.location", required = true) + private String location; + + /** + * Provisioning state of the App Service Environment. Possible values + * include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Current status of the App Service Environment. Possible values include: + * 'Preparing', 'Ready', 'Scaling', 'Deleting'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private HostingEnvironmentStatus status; + + /** + * Name of the Virtual Network for the App Service Environment. + */ + @JsonProperty(value = "properties.vnetName") + private String vnetName; + + /** + * Resource group of the Virtual Network. + */ + @JsonProperty(value = "properties.vnetResourceGroupName") + private String vnetResourceGroupName; + + /** + * Subnet of the Virtual Network. + */ + @JsonProperty(value = "properties.vnetSubnetName") + private String vnetSubnetName; + + /** + * Description of the Virtual Network. + */ + @JsonProperty(value = "properties.virtualNetwork", required = true) + private VirtualNetworkProfile virtualNetwork; + + /** + * Specifies which endpoints to serve internally in the Virtual Network for + * the App Service Environment. Possible values include: 'None', 'Web', + * 'Publishing'. + */ + @JsonProperty(value = "properties.internalLoadBalancingMode") + private InternalLoadBalancingMode internalLoadBalancingMode; + + /** + * Front-end VM size, e.g. "Medium", "Large". + */ + @JsonProperty(value = "properties.multiSize") + private String multiSize; + + /** + * Number of front-end instances. + */ + @JsonProperty(value = "properties.multiRoleCount") + private Integer multiRoleCount; + + /** + * Description of worker pools with worker size IDs, VM sizes, and number + * of workers in each pool. + */ + @JsonProperty(value = "properties.workerPools", required = true) + private List workerPools; + + /** + * Number of IP SSL addresses reserved for the App Service Environment. + */ + @JsonProperty(value = "properties.ipsslAddressCount") + private Integer ipsslAddressCount; + + /** + * Edition of the metadata database for the App Service Environment, e.g. + * "Standard". + */ + @JsonProperty(value = "properties.databaseEdition", access = JsonProperty.Access.WRITE_ONLY) + private String databaseEdition; + + /** + * Service objective of the metadata database for the App Service + * Environment, e.g. "S0". + */ + @JsonProperty(value = "properties.databaseServiceObjective", access = JsonProperty.Access.WRITE_ONLY) + private String databaseServiceObjective; + + /** + * Number of upgrade domains of the App Service Environment. + */ + @JsonProperty(value = "properties.upgradeDomains", access = JsonProperty.Access.WRITE_ONLY) + private Integer upgradeDomains; + + /** + * Subscription of the App Service Environment. + */ + @JsonProperty(value = "properties.subscriptionId", access = JsonProperty.Access.WRITE_ONLY) + private String subscriptionId; + + /** + * DNS suffix of the App Service Environment. + */ + @JsonProperty(value = "properties.dnsSuffix") + private String dnsSuffix; + + /** + * Last deployment action on the App Service Environment. + */ + @JsonProperty(value = "properties.lastAction", access = JsonProperty.Access.WRITE_ONLY) + private String lastAction; + + /** + * Result of the last deployment action on the App Service Environment. + */ + @JsonProperty(value = "properties.lastActionResult", access = JsonProperty.Access.WRITE_ONLY) + private String lastActionResult; + + /** + * List of comma separated strings describing which VM sizes are allowed + * for front-ends. + */ + @JsonProperty(value = "properties.allowedMultiSizes", access = JsonProperty.Access.WRITE_ONLY) + private String allowedMultiSizes; + + /** + * List of comma separated strings describing which VM sizes are allowed + * for workers. + */ + @JsonProperty(value = "properties.allowedWorkerSizes", access = JsonProperty.Access.WRITE_ONLY) + private String allowedWorkerSizes; + + /** + * Maximum number of VMs in the App Service Environment. + */ + @JsonProperty(value = "properties.maximumNumberOfMachines", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximumNumberOfMachines; + + /** + * Description of IP SSL mapping for the App Service Environment. + */ + @JsonProperty(value = "properties.vipMappings", access = JsonProperty.Access.WRITE_ONLY) + private List vipMappings; + + /** + * Current total, used, and available worker capacities. + */ + @JsonProperty(value = "properties.environmentCapacities", access = JsonProperty.Access.WRITE_ONLY) + private List environmentCapacities; + + /** + * Access control list for controlling traffic to the App Service + * Environment. + */ + @JsonProperty(value = "properties.networkAccessControlList") + private List networkAccessControlList; + + /** + * True/false indicating whether the App Service Environment is healthy. + */ + @JsonProperty(value = "properties.environmentIsHealthy", access = JsonProperty.Access.WRITE_ONLY) + private Boolean environmentIsHealthy; + + /** + * Detailed message about with results of the last check of the App Service + * Environment. + */ + @JsonProperty(value = "properties.environmentStatus", access = JsonProperty.Access.WRITE_ONLY) + private String environmentStatus; + + /** + * Resource group of the App Service Environment. + */ + @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /** + * Scale factor for front-ends. + */ + @JsonProperty(value = "properties.frontEndScaleFactor") + private Integer frontEndScaleFactor; + + /** + * Default Scale Factor for FrontEnds. + */ + @JsonProperty(value = "properties.defaultFrontEndScaleFactor", access = JsonProperty.Access.WRITE_ONLY) + private Integer defaultFrontEndScaleFactor; + + /** + * API Management Account associated with the App Service Environment. + */ + @JsonProperty(value = "properties.apiManagementAccountId") + private String apiManagementAccountId; + + /** + * <code>true</code> if the App Service Environment is + * suspended; otherwise, <code>false</code>. 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; + + /** + * True/false indicating whether the App Service 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.dynamicCacheEnabled") + private Boolean dynamicCacheEnabled; + + /** + * Custom settings for changing the behavior of the App Service + * Environment. + */ + @JsonProperty(value = "properties.clusterSettings") + private List clusterSettings; + + /** + * User added ip ranges to whitelist on ASE db. + */ + @JsonProperty(value = "properties.userWhitelistedIpRanges") + private List userWhitelistedIpRanges; + + /** + * Get the appServiceEnvironmentPatchResourceName value. + * + * @return the appServiceEnvironmentPatchResourceName value + */ + public String appServiceEnvironmentPatchResourceName() { + return this.appServiceEnvironmentPatchResourceName; + } + + /** + * Set the appServiceEnvironmentPatchResourceName value. + * + * @param appServiceEnvironmentPatchResourceName the appServiceEnvironmentPatchResourceName value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withAppServiceEnvironmentPatchResourceName(String appServiceEnvironmentPatchResourceName) { + this.appServiceEnvironmentPatchResourceName = appServiceEnvironmentPatchResourceName; + 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 AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status value. + * + * @return the status value + */ + public HostingEnvironmentStatus status() { + return this.status; + } + + /** + * Get the vnetName value. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the vnetName value. + * + * @param vnetName the vnetName value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the vnetResourceGroupName value. + * + * @return the vnetResourceGroupName value + */ + public String vnetResourceGroupName() { + return this.vnetResourceGroupName; + } + + /** + * Set the vnetResourceGroupName value. + * + * @param vnetResourceGroupName the vnetResourceGroupName value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withVnetResourceGroupName(String vnetResourceGroupName) { + this.vnetResourceGroupName = vnetResourceGroupName; + return this; + } + + /** + * Get the vnetSubnetName value. + * + * @return the vnetSubnetName value + */ + public String vnetSubnetName() { + return this.vnetSubnetName; + } + + /** + * Set the vnetSubnetName value. + * + * @param vnetSubnetName the vnetSubnetName value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withVnetSubnetName(String vnetSubnetName) { + this.vnetSubnetName = vnetSubnetName; + 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 AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + this.virtualNetwork = virtualNetwork; + return this; + } + + /** + * Get the internalLoadBalancingMode value. + * + * @return the internalLoadBalancingMode value + */ + public InternalLoadBalancingMode internalLoadBalancingMode() { + return this.internalLoadBalancingMode; + } + + /** + * Set the internalLoadBalancingMode value. + * + * @param internalLoadBalancingMode the internalLoadBalancingMode value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withInternalLoadBalancingMode(InternalLoadBalancingMode internalLoadBalancingMode) { + this.internalLoadBalancingMode = internalLoadBalancingMode; + return this; + } + + /** + * Get the multiSize value. + * + * @return the multiSize value + */ + public String multiSize() { + return this.multiSize; + } + + /** + * Set the multiSize value. + * + * @param multiSize the multiSize value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withMultiSize(String multiSize) { + this.multiSize = multiSize; + return this; + } + + /** + * Get the multiRoleCount value. + * + * @return the multiRoleCount value + */ + public Integer multiRoleCount() { + return this.multiRoleCount; + } + + /** + * Set the multiRoleCount value. + * + * @param multiRoleCount the multiRoleCount value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withMultiRoleCount(Integer multiRoleCount) { + this.multiRoleCount = multiRoleCount; + return this; + } + + /** + * Get the workerPools value. + * + * @return the workerPools value + */ + public List workerPools() { + return this.workerPools; + } + + /** + * Set the workerPools value. + * + * @param workerPools the workerPools value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withWorkerPools(List workerPools) { + this.workerPools = workerPools; + 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 AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withIpsslAddressCount(Integer ipsslAddressCount) { + this.ipsslAddressCount = ipsslAddressCount; + return this; + } + + /** + * Get the databaseEdition value. + * + * @return the databaseEdition value + */ + public String databaseEdition() { + return this.databaseEdition; + } + + /** + * Get the databaseServiceObjective value. + * + * @return the databaseServiceObjective value + */ + public String databaseServiceObjective() { + return this.databaseServiceObjective; + } + + /** + * Get the upgradeDomains value. + * + * @return the upgradeDomains value + */ + public Integer upgradeDomains() { + return this.upgradeDomains; + } + + /** + * Get the subscriptionId value. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * 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 AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withDnsSuffix(String dnsSuffix) { + this.dnsSuffix = dnsSuffix; + return this; + } + + /** + * Get the lastAction value. + * + * @return the lastAction value + */ + public String lastAction() { + return this.lastAction; + } + + /** + * Get the lastActionResult value. + * + * @return the lastActionResult value + */ + public String lastActionResult() { + return this.lastActionResult; + } + + /** + * Get the allowedMultiSizes value. + * + * @return the allowedMultiSizes value + */ + public String allowedMultiSizes() { + return this.allowedMultiSizes; + } + + /** + * Get the allowedWorkerSizes value. + * + * @return the allowedWorkerSizes value + */ + public String allowedWorkerSizes() { + return this.allowedWorkerSizes; + } + + /** + * Get the maximumNumberOfMachines value. + * + * @return the maximumNumberOfMachines value + */ + public Integer maximumNumberOfMachines() { + return this.maximumNumberOfMachines; + } + + /** + * Get the vipMappings value. + * + * @return the vipMappings value + */ + public List vipMappings() { + return this.vipMappings; + } + + /** + * Get the environmentCapacities value. + * + * @return the environmentCapacities value + */ + public List environmentCapacities() { + return this.environmentCapacities; + } + + /** + * Get the networkAccessControlList value. + * + * @return the networkAccessControlList value + */ + public List networkAccessControlList() { + return this.networkAccessControlList; + } + + /** + * Set the networkAccessControlList value. + * + * @param networkAccessControlList the networkAccessControlList value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withNetworkAccessControlList(List networkAccessControlList) { + this.networkAccessControlList = networkAccessControlList; + return this; + } + + /** + * Get the environmentIsHealthy value. + * + * @return the environmentIsHealthy value + */ + public Boolean environmentIsHealthy() { + return this.environmentIsHealthy; + } + + /** + * Get the environmentStatus value. + * + * @return the environmentStatus value + */ + public String environmentStatus() { + return this.environmentStatus; + } + + /** + * Get the resourceGroup value. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * 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 AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withFrontEndScaleFactor(Integer frontEndScaleFactor) { + this.frontEndScaleFactor = frontEndScaleFactor; + return this; + } + + /** + * Get the defaultFrontEndScaleFactor value. + * + * @return the defaultFrontEndScaleFactor value + */ + public Integer defaultFrontEndScaleFactor() { + return this.defaultFrontEndScaleFactor; + } + + /** + * Get the apiManagementAccountId value. + * + * @return the apiManagementAccountId value + */ + public String apiManagementAccountId() { + return this.apiManagementAccountId; + } + + /** + * Set the apiManagementAccountId value. + * + * @param apiManagementAccountId the apiManagementAccountId value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withApiManagementAccountId(String apiManagementAccountId) { + this.apiManagementAccountId = apiManagementAccountId; + 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 AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner 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 AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withDynamicCacheEnabled(Boolean dynamicCacheEnabled) { + this.dynamicCacheEnabled = dynamicCacheEnabled; + return this; + } + + /** + * Get the clusterSettings value. + * + * @return the clusterSettings value + */ + public List clusterSettings() { + return this.clusterSettings; + } + + /** + * Set the clusterSettings value. + * + * @param clusterSettings the clusterSettings value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withClusterSettings(List clusterSettings) { + this.clusterSettings = clusterSettings; + return this; + } + + /** + * Get the userWhitelistedIpRanges value. + * + * @return the userWhitelistedIpRanges value + */ + public List userWhitelistedIpRanges() { + return this.userWhitelistedIpRanges; + } + + /** + * Set the userWhitelistedIpRanges value. + * + * @param userWhitelistedIpRanges the userWhitelistedIpRanges value to set + * @return the AppServiceEnvironmentPatchResourceInner object itself. + */ + public AppServiceEnvironmentPatchResourceInner withUserWhitelistedIpRanges(List userWhitelistedIpRanges) { + this.userWhitelistedIpRanges = userWhitelistedIpRanges; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceEnvironmentResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceEnvironmentResourceInner.java new file mode 100644 index 00000000000..d2b43b89064 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceEnvironmentResourceInner.java @@ -0,0 +1,797 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.ProvisioningState; +import com.microsoft.azure.management.web.HostingEnvironmentStatus; +import com.microsoft.azure.management.web.VirtualNetworkProfile; +import com.microsoft.azure.management.web.InternalLoadBalancingMode; +import java.util.List; +import com.microsoft.azure.management.web.WorkerPool; +import com.microsoft.azure.management.web.VirtualIPMapping; +import com.microsoft.azure.management.web.NetworkAccessControlEntry; +import com.microsoft.azure.management.web.NameValuePair; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * App Service Environment ARM resource. + */ +@JsonFlatten +public class AppServiceEnvironmentResourceInner extends Resource { + /** + * Name of the App Service Environment. + */ + @JsonProperty(value = "properties.name", required = true) + private String appServiceEnvironmentResourceName; + + /** + * Location of the App Service Environment, e.g. "West US". + */ + @JsonProperty(value = "properties.location", required = true) + private String appServiceEnvironmentResourceLocation; + + /** + * Provisioning state of the App Service Environment. Possible values + * include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Current status of the App Service Environment. Possible values include: + * 'Preparing', 'Ready', 'Scaling', 'Deleting'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private HostingEnvironmentStatus status; + + /** + * Name of the Virtual Network for the App Service Environment. + */ + @JsonProperty(value = "properties.vnetName") + private String vnetName; + + /** + * Resource group of the Virtual Network. + */ + @JsonProperty(value = "properties.vnetResourceGroupName") + private String vnetResourceGroupName; + + /** + * Subnet of the Virtual Network. + */ + @JsonProperty(value = "properties.vnetSubnetName") + private String vnetSubnetName; + + /** + * Description of the Virtual Network. + */ + @JsonProperty(value = "properties.virtualNetwork", required = true) + private VirtualNetworkProfile virtualNetwork; + + /** + * Specifies which endpoints to serve internally in the Virtual Network for + * the App Service Environment. Possible values include: 'None', 'Web', + * 'Publishing'. + */ + @JsonProperty(value = "properties.internalLoadBalancingMode") + private InternalLoadBalancingMode internalLoadBalancingMode; + + /** + * Front-end VM size, e.g. "Medium", "Large". + */ + @JsonProperty(value = "properties.multiSize") + private String multiSize; + + /** + * Number of front-end instances. + */ + @JsonProperty(value = "properties.multiRoleCount") + private Integer multiRoleCount; + + /** + * Description of worker pools with worker size IDs, VM sizes, and number + * of workers in each pool. + */ + @JsonProperty(value = "properties.workerPools", required = true) + private List workerPools; + + /** + * Number of IP SSL addresses reserved for the App Service Environment. + */ + @JsonProperty(value = "properties.ipsslAddressCount") + private Integer ipsslAddressCount; + + /** + * Edition of the metadata database for the App Service Environment, e.g. + * "Standard". + */ + @JsonProperty(value = "properties.databaseEdition", access = JsonProperty.Access.WRITE_ONLY) + private String databaseEdition; + + /** + * Service objective of the metadata database for the App Service + * Environment, e.g. "S0". + */ + @JsonProperty(value = "properties.databaseServiceObjective", access = JsonProperty.Access.WRITE_ONLY) + private String databaseServiceObjective; + + /** + * Number of upgrade domains of the App Service Environment. + */ + @JsonProperty(value = "properties.upgradeDomains", access = JsonProperty.Access.WRITE_ONLY) + private Integer upgradeDomains; + + /** + * Subscription of the App Service Environment. + */ + @JsonProperty(value = "properties.subscriptionId", access = JsonProperty.Access.WRITE_ONLY) + private String subscriptionId; + + /** + * DNS suffix of the App Service Environment. + */ + @JsonProperty(value = "properties.dnsSuffix") + private String dnsSuffix; + + /** + * Last deployment action on the App Service Environment. + */ + @JsonProperty(value = "properties.lastAction", access = JsonProperty.Access.WRITE_ONLY) + private String lastAction; + + /** + * Result of the last deployment action on the App Service Environment. + */ + @JsonProperty(value = "properties.lastActionResult", access = JsonProperty.Access.WRITE_ONLY) + private String lastActionResult; + + /** + * List of comma separated strings describing which VM sizes are allowed + * for front-ends. + */ + @JsonProperty(value = "properties.allowedMultiSizes", access = JsonProperty.Access.WRITE_ONLY) + private String allowedMultiSizes; + + /** + * List of comma separated strings describing which VM sizes are allowed + * for workers. + */ + @JsonProperty(value = "properties.allowedWorkerSizes", access = JsonProperty.Access.WRITE_ONLY) + private String allowedWorkerSizes; + + /** + * Maximum number of VMs in the App Service Environment. + */ + @JsonProperty(value = "properties.maximumNumberOfMachines", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximumNumberOfMachines; + + /** + * Description of IP SSL mapping for the App Service Environment. + */ + @JsonProperty(value = "properties.vipMappings", access = JsonProperty.Access.WRITE_ONLY) + private List vipMappings; + + /** + * Current total, used, and available worker capacities. + */ + @JsonProperty(value = "properties.environmentCapacities", access = JsonProperty.Access.WRITE_ONLY) + private List environmentCapacities; + + /** + * Access control list for controlling traffic to the App Service + * Environment. + */ + @JsonProperty(value = "properties.networkAccessControlList") + private List networkAccessControlList; + + /** + * True/false indicating whether the App Service Environment is healthy. + */ + @JsonProperty(value = "properties.environmentIsHealthy", access = JsonProperty.Access.WRITE_ONLY) + private Boolean environmentIsHealthy; + + /** + * Detailed message about with results of the last check of the App Service + * Environment. + */ + @JsonProperty(value = "properties.environmentStatus", access = JsonProperty.Access.WRITE_ONLY) + private String environmentStatus; + + /** + * Resource group of the App Service Environment. + */ + @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /** + * Scale factor for front-ends. + */ + @JsonProperty(value = "properties.frontEndScaleFactor") + private Integer frontEndScaleFactor; + + /** + * Default Scale Factor for FrontEnds. + */ + @JsonProperty(value = "properties.defaultFrontEndScaleFactor", access = JsonProperty.Access.WRITE_ONLY) + private Integer defaultFrontEndScaleFactor; + + /** + * API Management Account associated with the App Service Environment. + */ + @JsonProperty(value = "properties.apiManagementAccountId") + private String apiManagementAccountId; + + /** + * <code>true</code> if the App Service Environment is + * suspended; otherwise, <code>false</code>. 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; + + /** + * True/false indicating whether the App Service 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.dynamicCacheEnabled") + private Boolean dynamicCacheEnabled; + + /** + * Custom settings for changing the behavior of the App Service + * Environment. + */ + @JsonProperty(value = "properties.clusterSettings") + private List clusterSettings; + + /** + * User added ip ranges to whitelist on ASE db. + */ + @JsonProperty(value = "properties.userWhitelistedIpRanges") + private List userWhitelistedIpRanges; + + /** + * Get the appServiceEnvironmentResourceName value. + * + * @return the appServiceEnvironmentResourceName value + */ + public String appServiceEnvironmentResourceName() { + return this.appServiceEnvironmentResourceName; + } + + /** + * Set the appServiceEnvironmentResourceName value. + * + * @param appServiceEnvironmentResourceName the appServiceEnvironmentResourceName value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withAppServiceEnvironmentResourceName(String appServiceEnvironmentResourceName) { + this.appServiceEnvironmentResourceName = appServiceEnvironmentResourceName; + return this; + } + + /** + * Get the appServiceEnvironmentResourceLocation value. + * + * @return the appServiceEnvironmentResourceLocation value + */ + public String appServiceEnvironmentResourceLocation() { + return this.appServiceEnvironmentResourceLocation; + } + + /** + * Set the appServiceEnvironmentResourceLocation value. + * + * @param appServiceEnvironmentResourceLocation the appServiceEnvironmentResourceLocation value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withAppServiceEnvironmentResourceLocation(String appServiceEnvironmentResourceLocation) { + this.appServiceEnvironmentResourceLocation = appServiceEnvironmentResourceLocation; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status value. + * + * @return the status value + */ + public HostingEnvironmentStatus status() { + return this.status; + } + + /** + * Get the vnetName value. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the vnetName value. + * + * @param vnetName the vnetName value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the vnetResourceGroupName value. + * + * @return the vnetResourceGroupName value + */ + public String vnetResourceGroupName() { + return this.vnetResourceGroupName; + } + + /** + * Set the vnetResourceGroupName value. + * + * @param vnetResourceGroupName the vnetResourceGroupName value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withVnetResourceGroupName(String vnetResourceGroupName) { + this.vnetResourceGroupName = vnetResourceGroupName; + return this; + } + + /** + * Get the vnetSubnetName value. + * + * @return the vnetSubnetName value + */ + public String vnetSubnetName() { + return this.vnetSubnetName; + } + + /** + * Set the vnetSubnetName value. + * + * @param vnetSubnetName the vnetSubnetName value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withVnetSubnetName(String vnetSubnetName) { + this.vnetSubnetName = vnetSubnetName; + 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 AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + this.virtualNetwork = virtualNetwork; + return this; + } + + /** + * Get the internalLoadBalancingMode value. + * + * @return the internalLoadBalancingMode value + */ + public InternalLoadBalancingMode internalLoadBalancingMode() { + return this.internalLoadBalancingMode; + } + + /** + * Set the internalLoadBalancingMode value. + * + * @param internalLoadBalancingMode the internalLoadBalancingMode value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withInternalLoadBalancingMode(InternalLoadBalancingMode internalLoadBalancingMode) { + this.internalLoadBalancingMode = internalLoadBalancingMode; + return this; + } + + /** + * Get the multiSize value. + * + * @return the multiSize value + */ + public String multiSize() { + return this.multiSize; + } + + /** + * Set the multiSize value. + * + * @param multiSize the multiSize value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withMultiSize(String multiSize) { + this.multiSize = multiSize; + return this; + } + + /** + * Get the multiRoleCount value. + * + * @return the multiRoleCount value + */ + public Integer multiRoleCount() { + return this.multiRoleCount; + } + + /** + * Set the multiRoleCount value. + * + * @param multiRoleCount the multiRoleCount value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withMultiRoleCount(Integer multiRoleCount) { + this.multiRoleCount = multiRoleCount; + return this; + } + + /** + * Get the workerPools value. + * + * @return the workerPools value + */ + public List workerPools() { + return this.workerPools; + } + + /** + * Set the workerPools value. + * + * @param workerPools the workerPools value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withWorkerPools(List workerPools) { + this.workerPools = workerPools; + 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 AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withIpsslAddressCount(Integer ipsslAddressCount) { + this.ipsslAddressCount = ipsslAddressCount; + return this; + } + + /** + * Get the databaseEdition value. + * + * @return the databaseEdition value + */ + public String databaseEdition() { + return this.databaseEdition; + } + + /** + * Get the databaseServiceObjective value. + * + * @return the databaseServiceObjective value + */ + public String databaseServiceObjective() { + return this.databaseServiceObjective; + } + + /** + * Get the upgradeDomains value. + * + * @return the upgradeDomains value + */ + public Integer upgradeDomains() { + return this.upgradeDomains; + } + + /** + * Get the subscriptionId value. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * 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 AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withDnsSuffix(String dnsSuffix) { + this.dnsSuffix = dnsSuffix; + return this; + } + + /** + * Get the lastAction value. + * + * @return the lastAction value + */ + public String lastAction() { + return this.lastAction; + } + + /** + * Get the lastActionResult value. + * + * @return the lastActionResult value + */ + public String lastActionResult() { + return this.lastActionResult; + } + + /** + * Get the allowedMultiSizes value. + * + * @return the allowedMultiSizes value + */ + public String allowedMultiSizes() { + return this.allowedMultiSizes; + } + + /** + * Get the allowedWorkerSizes value. + * + * @return the allowedWorkerSizes value + */ + public String allowedWorkerSizes() { + return this.allowedWorkerSizes; + } + + /** + * Get the maximumNumberOfMachines value. + * + * @return the maximumNumberOfMachines value + */ + public Integer maximumNumberOfMachines() { + return this.maximumNumberOfMachines; + } + + /** + * Get the vipMappings value. + * + * @return the vipMappings value + */ + public List vipMappings() { + return this.vipMappings; + } + + /** + * Get the environmentCapacities value. + * + * @return the environmentCapacities value + */ + public List environmentCapacities() { + return this.environmentCapacities; + } + + /** + * Get the networkAccessControlList value. + * + * @return the networkAccessControlList value + */ + public List networkAccessControlList() { + return this.networkAccessControlList; + } + + /** + * Set the networkAccessControlList value. + * + * @param networkAccessControlList the networkAccessControlList value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withNetworkAccessControlList(List networkAccessControlList) { + this.networkAccessControlList = networkAccessControlList; + return this; + } + + /** + * Get the environmentIsHealthy value. + * + * @return the environmentIsHealthy value + */ + public Boolean environmentIsHealthy() { + return this.environmentIsHealthy; + } + + /** + * Get the environmentStatus value. + * + * @return the environmentStatus value + */ + public String environmentStatus() { + return this.environmentStatus; + } + + /** + * Get the resourceGroup value. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * 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 AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withFrontEndScaleFactor(Integer frontEndScaleFactor) { + this.frontEndScaleFactor = frontEndScaleFactor; + return this; + } + + /** + * Get the defaultFrontEndScaleFactor value. + * + * @return the defaultFrontEndScaleFactor value + */ + public Integer defaultFrontEndScaleFactor() { + return this.defaultFrontEndScaleFactor; + } + + /** + * Get the apiManagementAccountId value. + * + * @return the apiManagementAccountId value + */ + public String apiManagementAccountId() { + return this.apiManagementAccountId; + } + + /** + * Set the apiManagementAccountId value. + * + * @param apiManagementAccountId the apiManagementAccountId value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withApiManagementAccountId(String apiManagementAccountId) { + this.apiManagementAccountId = apiManagementAccountId; + 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 AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner 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 AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withDynamicCacheEnabled(Boolean dynamicCacheEnabled) { + this.dynamicCacheEnabled = dynamicCacheEnabled; + return this; + } + + /** + * Get the clusterSettings value. + * + * @return the clusterSettings value + */ + public List clusterSettings() { + return this.clusterSettings; + } + + /** + * Set the clusterSettings value. + * + * @param clusterSettings the clusterSettings value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withClusterSettings(List clusterSettings) { + this.clusterSettings = clusterSettings; + return this; + } + + /** + * Get the userWhitelistedIpRanges value. + * + * @return the userWhitelistedIpRanges value + */ + public List userWhitelistedIpRanges() { + return this.userWhitelistedIpRanges; + } + + /** + * Set the userWhitelistedIpRanges value. + * + * @param userWhitelistedIpRanges the userWhitelistedIpRanges value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withUserWhitelistedIpRanges(List userWhitelistedIpRanges) { + this.userWhitelistedIpRanges = userWhitelistedIpRanges; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceEnvironmentsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceEnvironmentsInner.java new file mode 100644 index 00000000000..82ae0f23753 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServiceEnvironmentsInner.java @@ -0,0 +1,9400 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AppServiceEnvironments. + */ +public class AppServiceEnvironmentsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private AppServiceEnvironmentsService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * 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 AppServiceEnvironmentsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(AppServiceEnvironmentsService.class); + this.client = client; + } + + /** + * The interface defining all the services for AppServiceEnvironments to be + * used by Retrofit to perform actually REST calls. + */ + interface AppServiceEnvironmentsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments list" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listByResourceGroup" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") + Observable> getByResourceGroup(@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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}", method = "DELETE", hasBody = true) + 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}", method = "DELETE", hasBody = true) + 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServiceEnvironmentPatchResourceInner hostingEnvironmentEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listCapacities" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listVips" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listDiagnostics" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments getDiagnosticsItem" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMetricDefinitions" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMetrics" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRolePools" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments getMultiRolePool" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments createOrUpdateMultiRolePool" }) + @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 WorkerPoolResourceInner multiRolePoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments beginCreateOrUpdateMultiRolePool" }) + @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 WorkerPoolResourceInner multiRolePoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments updateMultiRolePool" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") + Observable> updateMultiRolePool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body WorkerPoolResourceInner multiRolePoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRolePoolInstanceMetricDefinitions" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRolePoolInstanceMetrics" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRoleMetricDefinitions" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRoleMetrics" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics") + 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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRolePoolSkus" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRoleUsages" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listOperations" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments reboot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments resume" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments beginResume" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listAppServicePlans" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWebApps" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments suspend" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments beginSuspend" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listUsages" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWorkerPools" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments getWorkerPool" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") + Observable> getWorkerPool(@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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments createOrUpdateWorkerPool" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") + Observable> createOrUpdateWorkerPool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Body WorkerPoolResourceInner workerPoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments beginCreateOrUpdateWorkerPool" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") + Observable> beginCreateOrUpdateWorkerPool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Body WorkerPoolResourceInner workerPoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments updateWorkerPool" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") + Observable> updateWorkerPool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Body WorkerPoolResourceInner workerPoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWorkerPoolInstanceMetricDefinitions" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWorkerPoolInstanceMetrics" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}metrics") + 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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWebWorkerMetricDefinitions" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWebWorkerMetrics" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWorkerPoolSkus" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWebWorkerUsages" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listCapacitiesNext" }) + @GET + Observable> listCapacitiesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMetricsNext" }) + @GET + Observable> listMetricsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRolePoolsNext" }) + @GET + Observable> listMultiRolePoolsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRolePoolInstanceMetricDefinitionsNext" }) + @GET + Observable> listMultiRolePoolInstanceMetricDefinitionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRolePoolInstanceMetricsNext" }) + @GET + Observable> listMultiRolePoolInstanceMetricsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRoleMetricDefinitionsNext" }) + @GET + Observable> listMultiRoleMetricDefinitionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRoleMetricsNext" }) + @GET + Observable> listMultiRoleMetricsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRolePoolSkusNext" }) + @GET + Observable> listMultiRolePoolSkusNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listMultiRoleUsagesNext" }) + @GET + Observable> listMultiRoleUsagesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments resumeNext" }) + @GET + Observable> resumeNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments beginResumeNext" }) + @GET + Observable> beginResumeNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listAppServicePlansNext" }) + @GET + Observable> listAppServicePlansNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWebAppsNext" }) + @GET + Observable> listWebAppsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments suspendNext" }) + @GET + Observable> suspendNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments beginSuspendNext" }) + @GET + Observable> beginSuspendNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listUsagesNext" }) + @GET + Observable> listUsagesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWorkerPoolsNext" }) + @GET + Observable> listWorkerPoolsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWorkerPoolInstanceMetricDefinitionsNext" }) + @GET + Observable> listWorkerPoolInstanceMetricDefinitionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWorkerPoolInstanceMetricsNext" }) + @GET + Observable> listWorkerPoolInstanceMetricsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWebWorkerMetricDefinitionsNext" }) + @GET + Observable> listWebWorkerMetricDefinitionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWebWorkerMetricsNext" }) + @GET + Observable> listWebWorkerMetricsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWorkerPoolSkusNext" }) + @GET + Observable> listWorkerPoolSkusNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServiceEnvironments listWebWorkerUsagesNext" }) + @GET + Observable> listWebWorkerUsagesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all App Service Environments for a subscription. + * Get all App Service Environments for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServiceEnvironmentResourceInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all App Service Environments for a subscription. + * Get all App Service Environments for a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all App Service Environments for a subscription. + * Get all App Service Environments for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceEnvironmentResourceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all App Service Environments for a subscription. + * Get all App Service Environments for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceEnvironmentResourceInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all App Service Environments for a subscription. + * Get all App Service Environments for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AppServiceEnvironmentResourceInner> 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all App Service Environments in a resource group. + * Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServiceEnvironmentResourceInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all App Service Environments in a resource group. + * Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all App Service Environments in a resource group. + * Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceEnvironmentResourceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all App Service Environments in a resource group. + * Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceEnvironmentResourceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all App Service Environments in a resource group. + * Get all App Service Environments in a resource group. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AppServiceEnvironmentResourceInner> 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the properties of an App Service Environment. + * Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceEnvironmentResourceInner object if successful. + */ + public AppServiceEnvironmentResourceInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get the properties of an App Service Environment. + * Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get the properties of an App Service Environment. + * Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceEnvironmentResourceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1, AppServiceEnvironmentResourceInner>() { + @Override + public AppServiceEnvironmentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the properties of an App Service Environment. + * Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceEnvironmentResourceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(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.getByResourceGroup(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 = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceEnvironmentResourceInner object if successful. + */ + public AppServiceEnvironmentResourceInner createOrUpdate(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).toBlocking().last().body(); + } + + /** + * Create or update an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope), serviceCallback); + } + + /** + * Create or update an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).map(new Func1, AppServiceEnvironmentResourceInner>() { + @Override + public AppServiceEnvironmentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + if (resourceGroupName == null) { + throw new 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 (hostingEnvironmentEnvelope == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentEnvelope is required and cannot be null."); + } + Validator.validate(hostingEnvironmentEnvelope); + 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 an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceEnvironmentResourceInner object if successful. + */ + public AppServiceEnvironmentResourceInner beginCreateOrUpdate(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).toBlocking().single().body(); + } + + /** + * Create or update an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope), serviceCallback); + } + + /** + * Create or update an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceEnvironmentResourceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).map(new Func1, AppServiceEnvironmentResourceInner>() { + @Override + public AppServiceEnvironmentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceEnvironmentResourceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + if (resourceGroupName == null) { + throw new 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 (hostingEnvironmentEnvelope == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentEnvelope is required and cannot be null."); + } + Validator.validate(hostingEnvironmentEnvelope); + 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) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(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); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String name) { + deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().body(); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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"; + final Boolean forceDelete = null; + 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 an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String name, Boolean forceDelete) { + deleteWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().last().body(); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service Environment contains resources. The default is <code>false</code>. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String name, Boolean forceDelete, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name, forceDelete), serviceCallback); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String name, Boolean forceDelete) { + return deleteWithServiceResponseAsync(resourceGroupName, name, forceDelete).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(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."); + } + 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 an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String name) { + beginDeleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String name) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(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 forceDelete = null; + 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 = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String name, Boolean forceDelete) { + beginDeleteWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().single().body(); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service Environment contains resources. The default is <code>false</code>. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String name, Boolean forceDelete, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, name, forceDelete), serviceCallback); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String name, Boolean forceDelete) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, name, forceDelete).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an App Service Environment. + * Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(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."); + } + 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 = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .register(400, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServiceEnvironmentResourceInner object if successful. + */ + public AppServiceEnvironmentResourceInner update(String resourceGroupName, String name, AppServiceEnvironmentPatchResourceInner hostingEnvironmentEnvelope) { + return updateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).toBlocking().single().body(); + } + + /** + * Create or update an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String name, AppServiceEnvironmentPatchResourceInner hostingEnvironmentEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope), serviceCallback); + } + + /** + * Create or update an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceEnvironmentResourceInner object + */ + public Observable updateAsync(String resourceGroupName, String name, AppServiceEnvironmentPatchResourceInner hostingEnvironmentEnvelope) { + return updateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).map(new Func1, AppServiceEnvironmentResourceInner>() { + @Override + public AppServiceEnvironmentResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update an App Service Environment. + * Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServiceEnvironmentResourceInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, AppServiceEnvironmentPatchResourceInner hostingEnvironmentEnvelope) { + if (resourceGroupName == null) { + throw new 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 (hostingEnvironmentEnvelope == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentEnvelope is required and cannot be null."); + } + Validator.validate(hostingEnvironmentEnvelope); + final String apiVersion = "2016-09-01"; + return service.update(resourceGroupName, name, this.client.subscriptionId(), hostingEnvironmentEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(400, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StampCapacityInner> object if successful. + */ + public PagedList listCapacities(final String resourceGroupName, final String name) { + ServiceResponse> response = listCapacitiesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCapacitiesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listCapacitiesSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listCapacitiesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StampCapacityInner> object + */ + public Observable> listCapacitiesAsync(final String resourceGroupName, final String name) { + return listCapacitiesWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StampCapacityInner> object + */ + public Observable>> listCapacitiesWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listCapacitiesSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listCapacitiesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Get the used, available, and total worker capacity an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StampCapacityInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listCapacitiesSinglePageAsync(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.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 = listCapacitiesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCapacitiesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get IP addresses assigned to an App Service Environment. + * Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AddressResponseInner object if successful. + */ + public AddressResponseInner listVips(String resourceGroupName, String name) { + return listVipsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get IP addresses assigned to an App Service Environment. + * Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listVipsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listVipsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get IP addresses assigned to an App Service Environment. + * Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AddressResponseInner object + */ + public Observable listVipsAsync(String resourceGroupName, String name) { + return listVipsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, AddressResponseInner>() { + @Override + public AddressResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get IP addresses assigned to an App Service Environment. + * Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AddressResponseInner object + */ + public Observable> listVipsWithServiceResponseAsync(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.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 = listVipsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listVipsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get diagnostic information for an App Service Environment. + * Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<HostingEnvironmentDiagnosticsInner> object if successful. + */ + public List listDiagnostics(String resourceGroupName, String name) { + return listDiagnosticsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get diagnostic information for an App Service Environment. + * Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDiagnosticsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listDiagnosticsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get diagnostic information for an App Service Environment. + * Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<HostingEnvironmentDiagnosticsInner> object + */ + public Observable> listDiagnosticsAsync(String resourceGroupName, String name) { + return listDiagnosticsWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get diagnostic information for an App Service Environment. + * Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<HostingEnvironmentDiagnosticsInner> object + */ + 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."); + } + 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) { + try { + ServiceResponse> clientResponse = listDiagnosticsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDiagnosticsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a diagnostics item for an App Service Environment. + * Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HostingEnvironmentDiagnosticsInner object if successful. + */ + public HostingEnvironmentDiagnosticsInner getDiagnosticsItem(String resourceGroupName, String name, String diagnosticsName) { + return getDiagnosticsItemWithServiceResponseAsync(resourceGroupName, name, diagnosticsName).toBlocking().single().body(); + } + + /** + * Get a diagnostics item for an App Service Environment. + * Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getDiagnosticsItemAsync(String resourceGroupName, String name, String diagnosticsName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDiagnosticsItemWithServiceResponseAsync(resourceGroupName, name, diagnosticsName), serviceCallback); + } + + /** + * Get a diagnostics item for an App Service Environment. + * Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HostingEnvironmentDiagnosticsInner object + */ + public Observable getDiagnosticsItemAsync(String resourceGroupName, String name, String diagnosticsName) { + return getDiagnosticsItemWithServiceResponseAsync(resourceGroupName, name, diagnosticsName).map(new Func1, HostingEnvironmentDiagnosticsInner>() { + @Override + public HostingEnvironmentDiagnosticsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a diagnostics item for an App Service Environment. + * Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HostingEnvironmentDiagnosticsInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = getDiagnosticsItemDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDiagnosticsItemDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get global metric definitions of an App Service Environment. + * Get global metric definitions of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricDefinitionInner object if successful. + */ + public MetricDefinitionInner listMetricDefinitions(String resourceGroupName, String name) { + return listMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get global metric definitions of an App Service Environment. + * Get global metric definitions of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listMetricDefinitionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get global metric definitions of an App Service Environment. + * Get global metric definitions of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricDefinitionInner object + */ + public Observable listMetricDefinitionsAsync(String resourceGroupName, String name) { + return listMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, MetricDefinitionInner>() { + @Override + public MetricDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get global metric definitions of an App Service Environment. + * Get global metric definitions of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricDefinitionInner object + */ + public Observable> listMetricDefinitionsWithServiceResponseAsync(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.listMetricDefinitions(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 = listMetricDefinitionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMetrics(final String resourceGroupName, final String name) { + ServiceResponse> response = listMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSinglePageAsync(resourceGroupName, name, details, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all multi-role pools. + * Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<WorkerPoolResourceInner> object if successful. + */ + public PagedList listMultiRolePools(final String resourceGroupName, final String name) { + ServiceResponse> response = listMultiRolePoolsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all multi-role pools. + * Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRolePoolsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRolePoolsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRolePoolsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all multi-role pools. + * Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkerPoolResourceInner> object + */ + public Observable> listMultiRolePoolsAsync(final String resourceGroupName, final String name) { + return listMultiRolePoolsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all multi-role pools. + * Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkerPoolResourceInner> object + */ + public Observable>> listMultiRolePoolsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMultiRolePoolsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRolePoolsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all multi-role pools. + * Get all multi-role pools. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkerPoolResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRolePoolsSinglePageAsync(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.listMultiRolePools(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 = listMultiRolePoolsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRolePoolsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get properties of a multi-role pool. + * Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkerPoolResourceInner object if successful. + */ + public WorkerPoolResourceInner getMultiRolePool(String resourceGroupName, String name) { + return getMultiRolePoolWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get properties of a multi-role pool. + * Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMultiRolePoolAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMultiRolePoolWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get properties of a multi-role pool. + * Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable getMultiRolePoolAsync(String resourceGroupName, String name) { + return getMultiRolePoolWithServiceResponseAsync(resourceGroupName, name).map(new Func1, WorkerPoolResourceInner>() { + @Override + public WorkerPoolResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get properties of a multi-role pool. + * Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable> getMultiRolePoolWithServiceResponseAsync(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.getMultiRolePool(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 = getMultiRolePoolDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMultiRolePoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkerPoolResourceInner object if successful. + */ + public WorkerPoolResourceInner createOrUpdateMultiRolePool(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return createOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).toBlocking().last().body(); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope), serviceCallback); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return createOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).map(new Func1, WorkerPoolResourceInner>() { + @Override + public WorkerPoolResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateMultiRolePoolWithServiceResponseAsync(String resourceGroupName, String name, WorkerPoolResourceInner 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."); + } + 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()); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkerPoolResourceInner object if successful. + */ + public WorkerPoolResourceInner beginCreateOrUpdateMultiRolePool(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).toBlocking().single().body(); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope), serviceCallback); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable beginCreateOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).map(new Func1, WorkerPoolResourceInner>() { + @Override + public WorkerPoolResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable> beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(String resourceGroupName, String name, WorkerPoolResourceInner 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."); + } + 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) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateMultiRolePoolDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateMultiRolePoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(400, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkerPoolResourceInner object if successful. + */ + public WorkerPoolResourceInner updateMultiRolePool(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return updateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).toBlocking().single().body(); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope), serviceCallback); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable updateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return updateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).map(new Func1, WorkerPoolResourceInner>() { + @Override + public WorkerPoolResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a multi-role pool. + * Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable> updateMultiRolePoolWithServiceResponseAsync(String resourceGroupName, String name, WorkerPoolResourceInner 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."); + } + Validator.validate(multiRolePoolEnvelope); + final String apiVersion = "2016-09-01"; + return service.updateMultiRolePool(resourceGroupName, name, this.client.subscriptionId(), multiRolePoolEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateMultiRolePoolDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateMultiRolePoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .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 multi-role pool of an App Service Environment. + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listMultiRolePoolInstanceMetricDefinitions(final String resourceGroupName, final String name, final String instance) { + ServiceResponse> response = listMultiRolePoolInstanceMetricDefinitionsSinglePageAsync(resourceGroupName, name, instance).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRolePoolInstanceMetricDefinitionsAsync(final String resourceGroupName, final String name, final String instance, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRolePoolInstanceMetricDefinitionsSinglePageAsync(resourceGroupName, name, instance), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable> listMultiRolePoolInstanceMetricDefinitionsAsync(final String resourceGroupName, final String name, final String instance) { + return listMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, instance) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable>> listMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name, final String instance) { + return listMultiRolePoolInstanceMetricDefinitionsSinglePageAsync(resourceGroupName, name, instance) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRolePoolInstanceMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRolePoolInstanceMetricDefinitionsSinglePageAsync(final String resourceGroupName, final String name, final 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(Response response) { + try { + ServiceResponse> result = listMultiRolePoolInstanceMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRolePoolInstanceMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMultiRolePoolInstanceMetrics(final String resourceGroupName, final String name, final String instance) { + ServiceResponse> response = listMultiRolePoolInstanceMetricsSinglePageAsync(resourceGroupName, name, instance).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRolePoolInstanceMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRolePoolInstanceMetricsAsync(final String resourceGroupName, final String name, final String instance, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRolePoolInstanceMetricsSinglePageAsync(resourceGroupName, name, instance), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRolePoolInstanceMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMultiRolePoolInstanceMetricsAsync(final String resourceGroupName, final String name, final String instance) { + return listMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMultiRolePoolInstanceMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String instance) { + return listMultiRolePoolInstanceMetricsSinglePageAsync(resourceGroupName, name, instance) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRolePoolInstanceMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRolePoolInstanceMetricsSinglePageAsync(final String resourceGroupName, final String name, final 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"; + final Boolean details = null; + 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) { + try { + ServiceResponse> result = listMultiRolePoolInstanceMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMultiRolePoolInstanceMetrics(final String resourceGroupName, final String name, final String instance, final Boolean details) { + ServiceResponse> response = listMultiRolePoolInstanceMetricsSinglePageAsync(resourceGroupName, name, instance, details).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRolePoolInstanceMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRolePoolInstanceMetricsAsync(final String resourceGroupName, final String name, final String instance, final Boolean details, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRolePoolInstanceMetricsSinglePageAsync(resourceGroupName, name, instance, details), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRolePoolInstanceMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMultiRolePoolInstanceMetricsAsync(final String resourceGroupName, final String name, final String instance, final Boolean details) { + return listMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance, details) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMultiRolePoolInstanceMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String instance, final Boolean details) { + return listMultiRolePoolInstanceMetricsSinglePageAsync(resourceGroupName, name, instance, details) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRolePoolInstanceMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param instance Name of the instance in the multi-role pool. + ServiceResponse> * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRolePoolInstanceMetricsSinglePageAsync(final String resourceGroupName, final String name, final String instance, final 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."); + } + 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) { + try { + ServiceResponse> result = listMultiRolePoolInstanceMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRolePoolInstanceMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listMultiRoleMetricDefinitions(final String resourceGroupName, final String name) { + ServiceResponse> response = listMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRoleMetricDefinitionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable> listMultiRoleMetricDefinitionsAsync(final String resourceGroupName, final String name) { + return listMultiRoleMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable>> listMultiRoleMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRoleMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Get metric definitions for a multi-role pool of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.listMultiRoleMetricDefinitions(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 = listMultiRoleMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRoleMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMultiRoleMetrics(final String resourceGroupName, final String name) { + ServiceResponse> response = listMultiRoleMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRoleMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRoleMetricsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMultiRoleMetricsAsync(final String resourceGroupName, final String name) { + return listMultiRoleMetricsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMultiRoleMetricsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMultiRoleMetricsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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 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 = listMultiRoleMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param startTime Beginning time of the metrics query. + * @param endTime End time of the metrics query. + * @param timeGrain Time granularity of the metrics query. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + 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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param startTime Beginning time of the metrics query. + * @param endTime End time of the metrics query. + * @param timeGrain Time granularity of the metrics query. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> 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 AzureServiceFuture.fromPageResponse( + listMultiRoleMetricsSinglePageAsync(resourceGroupName, name, startTime, endTime, timeGrain, details, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param startTime Beginning time of the metrics query. + * @param endTime End time of the metrics query. + * @param timeGrain Time granularity of the metrics query. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + 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) { + return response.body(); + } + }); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param startTime Beginning time of the metrics query. + * @param endTime End time of the metrics query. + * @param timeGrain Time granularity of the metrics query. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + 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) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param startTime Beginning time of the metrics query. + ServiceResponse> * @param endTime End time of the metrics query. + ServiceResponse> * @param timeGrain Time granularity of the metrics query. + ServiceResponse> * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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."); + } + 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.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 = listMultiRoleMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRoleMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SkuInfoInner> object if successful. + */ + public PagedList listMultiRolePoolSkus(final String resourceGroupName, final String name) { + ServiceResponse> response = listMultiRolePoolSkusSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRolePoolSkusAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRolePoolSkusSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRolePoolSkusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SkuInfoInner> object + */ + public Observable> listMultiRolePoolSkusAsync(final String resourceGroupName, final String name) { + return listMultiRolePoolSkusWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SkuInfoInner> object + */ + public Observable>> listMultiRolePoolSkusWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMultiRolePoolSkusSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRolePoolSkusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Get available SKUs for scaling a multi-role pool. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.listMultiRolePoolSkus(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 = listMultiRolePoolSkusDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRolePoolSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<UsageInner> object if successful. + */ + public PagedList listMultiRoleUsages(final String resourceGroupName, final String name) { + ServiceResponse> response = listMultiRoleUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRoleUsagesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRoleUsagesSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRoleUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageInner> object + */ + public Observable> listMultiRoleUsagesAsync(final String resourceGroupName, final String name) { + return listMultiRoleUsagesWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageInner> object + */ + public Observable>> listMultiRoleUsagesWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMultiRoleUsagesSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRoleUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Get usage metrics for a multi-role pool of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UsageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRoleUsagesSinglePageAsync(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.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 = listMultiRoleUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRoleUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List all currently running operations on the App Service Environment. + * List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<OperationInner> object if successful. + */ + public List listOperations(String resourceGroupName, String name) { + return listOperationsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * List all currently running operations on the App Service Environment. + * List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listOperationsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listOperationsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * List all currently running operations on the App Service Environment. + * List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<OperationInner> object + */ + public Observable> listOperationsAsync(String resourceGroupName, String name) { + return listOperationsWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all currently running operations on the App Service Environment. + * List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<OperationInner> object + */ + 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 (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.listOperations(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 = listOperationsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listOperationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reboot all machines in an App Service Environment. + * Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void reboot(String resourceGroupName, String name) { + rebootWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Reboot all machines in an App Service Environment. + * Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture rebootAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(rebootWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Reboot all machines in an App Service Environment. + * Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable rebootAsync(String resourceGroupName, String name) { + return rebootWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reboot all machines in an App Service Environment. + * Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> rebootWithServiceResponseAsync(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.reboot(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 = rebootDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse rebootDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .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); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList resume(final String resourceGroupName, final String name) { + ServiceResponse> response = resumeSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return resumeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> resumeAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + resumeSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return resumeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> resumeAsync(final String resourceGroupName, final String name) { + return resumeWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> resumeWithServiceResponseAsync(final String resourceGroupName, final String name) { + return resumeSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(resumeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> resumeSinglePageAsync(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.resume(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 = resumeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> resumeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList beginResume(final String resourceGroupName, final String name) { + ServiceResponse> response = beginResumeSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginResumeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> beginResumeAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginResumeSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginResumeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> beginResumeAsync(final String resourceGroupName, final String name) { + return beginResumeWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> beginResumeWithServiceResponseAsync(final String resourceGroupName, final String name) { + return beginResumeSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginResumeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> beginResumeSinglePageAsync(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.beginResume(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 = beginResumeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginResumeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all App Service plans in an App Service Environment. + * Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList listAppServicePlans(final String resourceGroupName, final String name) { + ServiceResponse> response = listAppServicePlansSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAppServicePlansNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all App Service plans in an App Service Environment. + * Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAppServicePlansAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAppServicePlansSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAppServicePlansNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all App Service plans in an App Service Environment. + * Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable> listAppServicePlansAsync(final String resourceGroupName, final String name) { + return listAppServicePlansWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all App Service plans in an App Service Environment. + * Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable>> listAppServicePlansWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listAppServicePlansSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAppServicePlansNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all App Service plans in an App Service Environment. + * Get all App Service plans in an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AppServicePlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAppServicePlansSinglePageAsync(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.listAppServicePlans(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 = listAppServicePlansDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAppServicePlansDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listWebApps(final String resourceGroupName, final String name) { + ServiceResponse> response = listWebAppsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebAppsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebAppsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 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) { + try { + ServiceResponse> result = listWebAppsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param propertiesToInclude Comma separated list of app properties to include. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listWebApps(final String resourceGroupName, final String name, final String propertiesToInclude) { + ServiceResponse> response = listWebAppsSinglePageAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param propertiesToInclude Comma separated list of app properties to include. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebAppsAsync(final String resourceGroupName, final String name, final String propertiesToInclude, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebAppsSinglePageAsync(resourceGroupName, name, propertiesToInclude), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param propertiesToInclude Comma separated list of app properties to include. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + 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.body(); + } + }); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param propertiesToInclude Comma separated list of app properties to include. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + 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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param propertiesToInclude Comma separated list of app properties to include. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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."); + } + 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(), propertiesToInclude, 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebAppsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList suspend(final String resourceGroupName, final String name) { + ServiceResponse> response = suspendSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return suspendNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> suspendAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + suspendSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return suspendNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> suspendAsync(final String resourceGroupName, final String name) { + return suspendWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> suspendWithServiceResponseAsync(final String resourceGroupName, final String name) { + return suspendSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(suspendNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> suspendSinglePageAsync(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.suspend(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 = suspendDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> suspendDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList beginSuspend(final String resourceGroupName, final String name) { + ServiceResponse> response = beginSuspendSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginSuspendNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> beginSuspendAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginSuspendSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginSuspendNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> beginSuspendAsync(final String resourceGroupName, final String name) { + return beginSuspendWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> beginSuspendWithServiceResponseAsync(final String resourceGroupName, final String name) { + return beginSuspendSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginSuspendNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> beginSuspendSinglePageAsync(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.beginSuspend(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 = beginSuspendDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginSuspendDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmUsageQuotaInner> object if successful. + */ + public PagedList listUsages(final String resourceGroupName, final String name) { + ServiceResponse> response = listUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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-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) { + try { + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesAsync(final String resourceGroupName, final String name, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesSinglePageAsync(resourceGroupName, name, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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-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) { + try { + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all worker pools of an App Service Environment. + * Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<WorkerPoolResourceInner> object if successful. + */ + public PagedList listWorkerPools(final String resourceGroupName, final String name) { + ServiceResponse> response = listWorkerPoolsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all worker pools of an App Service Environment. + * Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWorkerPoolsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWorkerPoolsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWorkerPoolsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all worker pools of an App Service Environment. + * Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkerPoolResourceInner> object + */ + public Observable> listWorkerPoolsAsync(final String resourceGroupName, final String name) { + return listWorkerPoolsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all worker pools of an App Service Environment. + * Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkerPoolResourceInner> object + */ + public Observable>> listWorkerPoolsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listWorkerPoolsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWorkerPoolsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all worker pools of an App Service Environment. + * Get all worker pools of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkerPoolResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.listWorkerPools(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 = listWorkerPoolsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWorkerPoolsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get properties of a worker pool. + * Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkerPoolResourceInner object if successful. + */ + public WorkerPoolResourceInner getWorkerPool(String resourceGroupName, String name, String workerPoolName) { + return getWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName).toBlocking().single().body(); + } + + /** + * Get properties of a worker pool. + * Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName), serviceCallback); + } + + /** + * Get properties of a worker pool. + * Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable getWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName) { + return getWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName).map(new Func1, WorkerPoolResourceInner>() { + @Override + public WorkerPoolResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get properties of a worker pool. + * Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable> getWorkerPoolWithServiceResponseAsync(String resourceGroupName, String name, 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."); + } + 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) { + try { + ServiceResponse clientResponse = getWorkerPoolDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getWorkerPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkerPoolResourceInner object if successful. + */ + public WorkerPoolResourceInner createOrUpdateWorkerPool(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + return createOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).toBlocking().last().body(); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope), serviceCallback); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + return createOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).map(new Func1, WorkerPoolResourceInner>() { + @Override + public WorkerPoolResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWorkerPoolWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner 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()); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkerPoolResourceInner object if successful. + */ + public WorkerPoolResourceInner beginCreateOrUpdateWorkerPool(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + return beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).toBlocking().single().body(); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope), serviceCallback); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable beginCreateOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + return beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).map(new Func1, WorkerPoolResourceInner>() { + @Override + public WorkerPoolResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable> beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner 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"; + 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) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateWorkerPoolDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateWorkerPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(400, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkerPoolResourceInner object if successful. + */ + public WorkerPoolResourceInner updateWorkerPool(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + return updateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).toBlocking().single().body(); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope), serviceCallback); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable updateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + return updateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).map(new Func1, WorkerPoolResourceInner>() { + @Override + public WorkerPoolResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkerPoolResourceInner object + */ + public Observable> updateWorkerPoolWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner 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"; + return service.updateWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), workerPoolEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateWorkerPoolDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateWorkerPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .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 an App Service Environment. + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listWorkerPoolInstanceMetricDefinitions(final String resourceGroupName, final String name, final String workerPoolName, final String instance) { + ServiceResponse> response = listWorkerPoolInstanceMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName, instance).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWorkerPoolInstanceMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWorkerPoolInstanceMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName, instance), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable> listWorkerPoolInstanceMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance) { + return listWorkerPoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable>> listWorkerPoolInstanceMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance) { + return listWorkerPoolInstanceMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName, instance) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWorkerPoolInstanceMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param workerPoolName Name of the worker pool. + ServiceResponse> * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWorkerPoolInstanceMetricDefinitionsSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName, final 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."); + } + 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> result = listWorkerPoolInstanceMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWorkerPoolInstanceMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listWorkerPoolInstanceMetrics(final String resourceGroupName, final String name, final String workerPoolName, final String instance) { + ServiceResponse> response = listWorkerPoolInstanceMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, instance).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWorkerPoolInstanceMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWorkerPoolInstanceMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWorkerPoolInstanceMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, instance), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWorkerPoolInstanceMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listWorkerPoolInstanceMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance) { + return listWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listWorkerPoolInstanceMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance) { + return listWorkerPoolInstanceMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, instance) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWorkerPoolInstanceMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWorkerPoolInstanceMetricsSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName, final 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."); + } + final String apiVersion = "2016-09-01"; + final Boolean details = null; + 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> result = listWorkerPoolInstanceMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listWorkerPoolInstanceMetrics(final String resourceGroupName, final String name, final String workerPoolName, final String instance, final Boolean details, final String filter) { + ServiceResponse> response = listWorkerPoolInstanceMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, instance, details, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWorkerPoolInstanceMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWorkerPoolInstanceMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWorkerPoolInstanceMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, instance, details, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWorkerPoolInstanceMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listWorkerPoolInstanceMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance, final Boolean details, final String filter) { + return listWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance, details, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listWorkerPoolInstanceMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance, final Boolean details, final String filter) { + return listWorkerPoolInstanceMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, instance, details, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWorkerPoolInstanceMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param workerPoolName Name of the worker pool. + ServiceResponse> * @param instance Name of the instance in the worker pool. + ServiceResponse> * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWorkerPoolInstanceMetricsSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance, 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 (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.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> result = listWorkerPoolInstanceMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWorkerPoolInstanceMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listWebWorkerMetricDefinitions(final String resourceGroupName, final String name, final String workerPoolName) { + ServiceResponse> response = listWebWorkerMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebWorkerMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebWorkerMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + 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.body(); + } + }); + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> 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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebWorkerMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Get metric definitions for a worker pool of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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."); + } + 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) { + try { + ServiceResponse> result = listWebWorkerMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebWorkerMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get 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 the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of worker pool + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listWebWorkerMetrics(final String resourceGroupName, final String name, final String workerPoolName) { + ServiceResponse> response = listWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of worker pool + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebWorkerMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of worker pool + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + 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) { + return response.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of worker pool + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + 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) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of worker pool + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse> result = listWebWorkerMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of worker pool + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + 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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of worker pool + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebWorkerMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, details, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of worker pool + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + 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) { + return response.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of worker pool + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + 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) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param workerPoolName Name of worker pool + ServiceResponse> * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse> result = listWebWorkerMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebWorkerMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get available SKUs for scaling a worker pool. + * Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SkuInfoInner> object if successful. + */ + public PagedList listWorkerPoolSkus(final String resourceGroupName, final String name, final String workerPoolName) { + ServiceResponse> response = listWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available SKUs for scaling a worker pool. + * Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWorkerPoolSkusAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWorkerPoolSkusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available SKUs for scaling a worker pool. + * Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SkuInfoInner> object + */ + 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) { + return response.body(); + } + }); + } + + /** + * Get available SKUs for scaling a worker pool. + * Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SkuInfoInner> object + */ + 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) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWorkerPoolSkusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get available SKUs for scaling a worker pool. + * Get available SKUs for scaling a worker pool. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse> result = listWorkerPoolSkusDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWorkerPoolSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<UsageInner> object if successful. + */ + public PagedList listWebWorkerUsages(final String resourceGroupName, final String name, final String workerPoolName) { + ServiceResponse> response = listWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebWorkerUsagesAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebWorkerUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageInner> object + */ + 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) { + return response.body(); + } + }); + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageInner> object + */ + 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) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebWorkerUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Get usage metrics for a worker pool of an App Service Environment. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UsageInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse> result = listWebWorkerUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebWorkerUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all App Service Environments for a subscription. + * Get all App Service Environments for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServiceEnvironmentResourceInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all App Service Environments for a subscription. + * Get all App Service Environments for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all App Service Environments for a subscription. + * Get all App Service Environments for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceEnvironmentResourceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all App Service Environments for a subscription. + * Get all App Service Environments for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceEnvironmentResourceInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all App Service Environments for a subscription. + * Get all App Service Environments for a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AppServiceEnvironmentResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all App Service Environments in a resource group. + * Get all App Service Environments in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServiceEnvironmentResourceInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all App Service Environments in a resource group. + * Get all App Service Environments in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all App Service Environments in a resource group. + * Get all App Service Environments in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceEnvironmentResourceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all App Service Environments in a resource group. + * Get all App Service Environments in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServiceEnvironmentResourceInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all App Service Environments in a resource group. + * Get all App Service Environments in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AppServiceEnvironmentResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Get the used, available, and total worker capacity an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StampCapacityInner> object if successful. + */ + public PagedList listCapacitiesNext(final String nextPageLink) { + ServiceResponse> response = listCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Get the used, available, and total worker capacity an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCapacitiesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listCapacitiesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listCapacitiesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Get the used, available, and total worker capacity an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StampCapacityInner> object + */ + public Observable> listCapacitiesNextAsync(final String nextPageLink) { + return listCapacitiesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Get the used, available, and total worker capacity an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StampCapacityInner> object + */ + public Observable>> listCapacitiesNextWithServiceResponseAsync(final String nextPageLink) { + return listCapacitiesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listCapacitiesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Get the used, available, and total worker capacity an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StampCapacityInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listCapacitiesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listCapacitiesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCapacitiesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCapacitiesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMetricsNext(final String nextPageLink) { + ServiceResponse> response = listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMetricsNextAsync(final String nextPageLink) { + return listMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get global metrics of an App Service Environment. + * Get global metrics of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMetricsNext(nextUrl, 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all multi-role pools. + * Get all multi-role pools. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<WorkerPoolResourceInner> object if successful. + */ + public PagedList listMultiRolePoolsNext(final String nextPageLink) { + ServiceResponse> response = listMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all multi-role pools. + * Get all multi-role pools. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRolePoolsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRolePoolsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRolePoolsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all multi-role pools. + * Get all multi-role pools. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkerPoolResourceInner> object + */ + public Observable> listMultiRolePoolsNextAsync(final String nextPageLink) { + return listMultiRolePoolsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all multi-role pools. + * Get all multi-role pools. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkerPoolResourceInner> object + */ + public Observable>> listMultiRolePoolsNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRolePoolsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRolePoolsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all multi-role pools. + * Get all multi-role pools. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkerPoolResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRolePoolsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMultiRolePoolsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRolePoolsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRolePoolsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listMultiRolePoolInstanceMetricDefinitionsNext(final String nextPageLink) { + ServiceResponse> response = listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRolePoolInstanceMetricDefinitionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable> listMultiRolePoolInstanceMetricDefinitionsNextAsync(final String nextPageLink) { + return listMultiRolePoolInstanceMetricDefinitionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable>> listMultiRolePoolInstanceMetricDefinitionsNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRolePoolInstanceMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMultiRolePoolInstanceMetricDefinitionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRolePoolInstanceMetricDefinitionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRolePoolInstanceMetricDefinitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMultiRolePoolInstanceMetricsNext(final String nextPageLink) { + ServiceResponse> response = listMultiRolePoolInstanceMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRolePoolInstanceMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRolePoolInstanceMetricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRolePoolInstanceMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRolePoolInstanceMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMultiRolePoolInstanceMetricsNextAsync(final String nextPageLink) { + return listMultiRolePoolInstanceMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMultiRolePoolInstanceMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRolePoolInstanceMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRolePoolInstanceMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * Get metrics for a specific instance of a multi-role pool of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRolePoolInstanceMetricsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMultiRolePoolInstanceMetricsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRolePoolInstanceMetricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRolePoolInstanceMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listMultiRoleMetricDefinitionsNext(final String nextPageLink) { + ServiceResponse> response = listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRoleMetricDefinitionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable> listMultiRoleMetricDefinitionsNextAsync(final String nextPageLink) { + return listMultiRoleMetricDefinitionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable>> listMultiRoleMetricDefinitionsNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRoleMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Get metric definitions for a multi-role pool of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRoleMetricDefinitionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMultiRoleMetricDefinitionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRoleMetricDefinitionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRoleMetricDefinitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMultiRoleMetricsNext(final String nextPageLink) { + ServiceResponse> response = listMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRoleMetricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRoleMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMultiRoleMetricsNextAsync(final String nextPageLink) { + return listMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMultiRoleMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for a multi-role pool of an App Service Environment. + * Get metrics for a multi-role pool of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRoleMetricsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMultiRoleMetricsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRoleMetricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRoleMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Get available SKUs for scaling a multi-role pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SkuInfoInner> object if successful. + */ + public PagedList listMultiRolePoolSkusNext(final String nextPageLink) { + ServiceResponse> response = listMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Get available SKUs for scaling a multi-role pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRolePoolSkusNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRolePoolSkusNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRolePoolSkusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Get available SKUs for scaling a multi-role pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SkuInfoInner> object + */ + public Observable> listMultiRolePoolSkusNextAsync(final String nextPageLink) { + return listMultiRolePoolSkusNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Get available SKUs for scaling a multi-role pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SkuInfoInner> object + */ + public Observable>> listMultiRolePoolSkusNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRolePoolSkusNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRolePoolSkusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Get available SKUs for scaling a multi-role pool. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRolePoolSkusNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMultiRolePoolSkusNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRolePoolSkusNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRolePoolSkusNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<UsageInner> object if successful. + */ + public PagedList listMultiRoleUsagesNext(final String nextPageLink) { + ServiceResponse> response = listMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMultiRoleUsagesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMultiRoleUsagesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMultiRoleUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageInner> object + */ + public Observable> listMultiRoleUsagesNextAsync(final String nextPageLink) { + return listMultiRoleUsagesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageInner> object + */ + public Observable>> listMultiRoleUsagesNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRoleUsagesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMultiRoleUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Get usage metrics for a multi-role pool of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UsageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMultiRoleUsagesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMultiRoleUsagesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRoleUsagesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRoleUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList resumeNext(final String nextPageLink) { + ServiceResponse> response = resumeNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return resumeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> resumeNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + resumeNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return resumeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> resumeNextAsync(final String nextPageLink) { + return resumeNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> resumeNextWithServiceResponseAsync(final String nextPageLink) { + return resumeNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(resumeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> resumeNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.resumeNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = resumeNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> resumeNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList beginResumeNext(final String nextPageLink) { + ServiceResponse> response = beginResumeNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginResumeNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> beginResumeNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginResumeNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginResumeNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> beginResumeNextAsync(final String nextPageLink) { + return beginResumeNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> beginResumeNextWithServiceResponseAsync(final String nextPageLink) { + return beginResumeNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginResumeNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Resume an App Service Environment. + * Resume an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> beginResumeNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.beginResumeNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = beginResumeNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginResumeNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all App Service plans in an App Service Environment. + * Get all App Service plans in an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList listAppServicePlansNext(final String nextPageLink) { + ServiceResponse> response = listAppServicePlansNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAppServicePlansNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all App Service plans in an App Service Environment. + * Get all App Service plans in an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAppServicePlansNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAppServicePlansNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAppServicePlansNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all App Service plans in an App Service Environment. + * Get all App Service plans in an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable> listAppServicePlansNextAsync(final String nextPageLink) { + return listAppServicePlansNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all App Service plans in an App Service Environment. + * Get all App Service plans in an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable>> listAppServicePlansNextWithServiceResponseAsync(final String nextPageLink) { + return listAppServicePlansNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAppServicePlansNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all App Service plans in an App Service Environment. + * Get all App Service plans in an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AppServicePlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAppServicePlansNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listAppServicePlansNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAppServicePlansNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAppServicePlansNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listWebAppsNext(final String nextPageLink) { + ServiceResponse> response = listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebAppsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebAppsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listWebAppsNextAsync(final String nextPageLink) { + return listWebAppsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listWebAppsNextWithServiceResponseAsync(final String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all apps in an App Service Environment. + * Get all apps in an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWebAppsNext(nextUrl, 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebAppsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList suspendNext(final String nextPageLink) { + ServiceResponse> response = suspendNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return suspendNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> suspendNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + suspendNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return suspendNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> suspendNextAsync(final String nextPageLink) { + return suspendNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> suspendNextWithServiceResponseAsync(final String nextPageLink) { + return suspendNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(suspendNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> suspendNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.suspendNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = suspendNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> suspendNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList beginSuspendNext(final String nextPageLink) { + ServiceResponse> response = beginSuspendNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginSuspendNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> beginSuspendNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginSuspendNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginSuspendNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> beginSuspendNextAsync(final String nextPageLink) { + return beginSuspendNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> beginSuspendNextWithServiceResponseAsync(final String nextPageLink) { + return beginSuspendNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginSuspendNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Suspend an App Service Environment. + * Suspend an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> beginSuspendNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.beginSuspendNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = beginSuspendNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginSuspendNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmUsageQuotaInner> object if successful. + */ + public PagedList listUsagesNext(final String nextPageLink) { + ServiceResponse> response = listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable> listUsagesNextAsync(final String nextPageLink) { + return listUsagesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable>> listUsagesNextWithServiceResponseAsync(final String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get global usage metrics of an App Service Environment. + * Get global usage metrics of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listUsagesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listUsagesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all worker pools of an App Service Environment. + * Get all worker pools of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<WorkerPoolResourceInner> object if successful. + */ + public PagedList listWorkerPoolsNext(final String nextPageLink) { + ServiceResponse> response = listWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all worker pools of an App Service Environment. + * Get all worker pools of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWorkerPoolsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWorkerPoolsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWorkerPoolsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all worker pools of an App Service Environment. + * Get all worker pools of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkerPoolResourceInner> object + */ + public Observable> listWorkerPoolsNextAsync(final String nextPageLink) { + return listWorkerPoolsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all worker pools of an App Service Environment. + * Get all worker pools of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkerPoolResourceInner> object + */ + public Observable>> listWorkerPoolsNextWithServiceResponseAsync(final String nextPageLink) { + return listWorkerPoolsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWorkerPoolsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all worker pools of an App Service Environment. + * Get all worker pools of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkerPoolResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWorkerPoolsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWorkerPoolsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWorkerPoolsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWorkerPoolsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listWorkerPoolInstanceMetricDefinitionsNext(final String nextPageLink) { + ServiceResponse> response = listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWorkerPoolInstanceMetricDefinitionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable> listWorkerPoolInstanceMetricDefinitionsNextAsync(final String nextPageLink) { + return listWorkerPoolInstanceMetricDefinitionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable>> listWorkerPoolInstanceMetricDefinitionsNextWithServiceResponseAsync(final String nextPageLink) { + return listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWorkerPoolInstanceMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWorkerPoolInstanceMetricDefinitionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWorkerPoolInstanceMetricDefinitionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWorkerPoolInstanceMetricDefinitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listWorkerPoolInstanceMetricsNext(final String nextPageLink) { + ServiceResponse> response = listWorkerPoolInstanceMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWorkerPoolInstanceMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWorkerPoolInstanceMetricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWorkerPoolInstanceMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWorkerPoolInstanceMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listWorkerPoolInstanceMetricsNextAsync(final String nextPageLink) { + return listWorkerPoolInstanceMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listWorkerPoolInstanceMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listWorkerPoolInstanceMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWorkerPoolInstanceMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * Get metrics for a specific instance of a worker pool of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWorkerPoolInstanceMetricsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWorkerPoolInstanceMetricsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWorkerPoolInstanceMetricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWorkerPoolInstanceMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Get metric definitions for a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listWebWorkerMetricDefinitionsNext(final String nextPageLink) { + ServiceResponse> response = listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Get metric definitions for a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebWorkerMetricDefinitionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Get metric definitions for a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable> listWebWorkerMetricDefinitionsNextAsync(final String nextPageLink) { + return listWebWorkerMetricDefinitionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Get metric definitions for a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable>> listWebWorkerMetricDefinitionsNextWithServiceResponseAsync(final String nextPageLink) { + return listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebWorkerMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Get metric definitions for a worker pool of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebWorkerMetricDefinitionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWebWorkerMetricDefinitionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebWorkerMetricDefinitionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebWorkerMetricDefinitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listWebWorkerMetricsNext(final String nextPageLink) { + ServiceResponse> response = listWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebWorkerMetricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebWorkerMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listWebWorkerMetricsNextAsync(final String nextPageLink) { + return listWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listWebWorkerMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebWorkerMetricsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWebWorkerMetricsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebWorkerMetricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebWorkerMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SkuInfoInner> object if successful. + */ + public PagedList listWorkerPoolSkusNext(final String nextPageLink) { + ServiceResponse> response = listWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWorkerPoolSkusNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWorkerPoolSkusNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWorkerPoolSkusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SkuInfoInner> object + */ + public Observable> listWorkerPoolSkusNextAsync(final String nextPageLink) { + return listWorkerPoolSkusNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SkuInfoInner> object + */ + public Observable>> listWorkerPoolSkusNextWithServiceResponseAsync(final String nextPageLink) { + return listWorkerPoolSkusNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWorkerPoolSkusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWorkerPoolSkusNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWorkerPoolSkusNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWorkerPoolSkusNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWorkerPoolSkusNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Get usage metrics for a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<UsageInner> object if successful. + */ + public PagedList listWebWorkerUsagesNext(final String nextPageLink) { + ServiceResponse> response = listWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Get usage metrics for a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebWorkerUsagesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebWorkerUsagesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebWorkerUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Get usage metrics for a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageInner> object + */ + public Observable> listWebWorkerUsagesNextAsync(final String nextPageLink) { + return listWebWorkerUsagesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Get usage metrics for a worker pool of an App Service Environment. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UsageInner> object + */ + public Observable>> listWebWorkerUsagesNextWithServiceResponseAsync(final String nextPageLink) { + return listWebWorkerUsagesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebWorkerUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Get usage metrics for a worker pool of an App Service Environment. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UsageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebWorkerUsagesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWebWorkerUsagesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebWorkerUsagesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebWorkerUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServicePlanInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServicePlanInner.java new file mode 100644 index 00000000000..f1012b44334 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServicePlanInner.java @@ -0,0 +1,426 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.StatusOptions; +import com.microsoft.azure.management.web.HostingEnvironmentProfile; +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.ProvisioningState; +import com.microsoft.azure.management.web.SkuDescription; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * App Service plan. + */ +@JsonFlatten +public class AppServicePlanInner extends Resource { + /** + * Name for the App Service plan. + */ + @JsonProperty(value = "properties.name", required = true) + private String appServicePlanName; + + /** + * Target worker tier assigned to the App Service plan. + */ + @JsonProperty(value = "properties.workerTierName") + private String workerTierName; + + /** + * App Service plan status. Possible values include: 'Ready', 'Pending', + * 'Creating'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private StatusOptions status; + + /** + * App Service plan subscription. + */ + @JsonProperty(value = "properties.subscription", access = JsonProperty.Access.WRITE_ONLY) + private String subscription; + + /** + * App Service plan administration site. + */ + @JsonProperty(value = "properties.adminSiteName") + private String adminSiteName; + + /** + * Specification for the App Service Environment to use for the App Service + * plan. + */ + @JsonProperty(value = "properties.hostingEnvironmentProfile") + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /** + * Maximum number of instances that can be assigned to this App Service + * plan. + */ + @JsonProperty(value = "properties.maximumNumberOfWorkers", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximumNumberOfWorkers; + + /** + * Geographical location for the App Service plan. + */ + @JsonProperty(value = "properties.geoRegion", access = JsonProperty.Access.WRITE_ONLY) + private String geoRegion; + + /** + * If <code>true</code>, apps assigned to this App Service plan + * can be scaled independently. + * If <code>false</code>, apps assigned to this App Service + * plan will scale to all instances of the plan. + */ + @JsonProperty(value = "properties.perSiteScaling") + private Boolean perSiteScaling; + + /** + * Number of apps assigned to this App Service plan. + */ + @JsonProperty(value = "properties.numberOfSites", access = JsonProperty.Access.WRITE_ONLY) + private Integer numberOfSites; + + /** + * If <code>true</code>, this App Service Plan owns spot + * instances. + */ + @JsonProperty(value = "properties.isSpot") + private Boolean isSpot; + + /** + * The time when the server farm expires. Valid only if it is a spot server + * farm. + */ + @JsonProperty(value = "properties.spotExpirationTime") + private DateTime spotExpirationTime; + + /** + * Resource group of the App Service plan. + */ + @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /** + * If Linux app service plan <code>true</code>, + * <code>false</code> otherwise. + */ + @JsonProperty(value = "properties.reserved") + private Boolean reserved; + + /** + * Scaling worker count. + */ + @JsonProperty(value = "properties.targetWorkerCount") + private Integer targetWorkerCount; + + /** + * Scaling worker size ID. + */ + @JsonProperty(value = "properties.targetWorkerSizeId") + private Integer targetWorkerSizeId; + + /** + * Provisioning state of the App Service Environment. Possible values + * include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The sku property. + */ + @JsonProperty(value = "sku") + private SkuDescription sku; + + /** + * Get the appServicePlanName value. + * + * @return the appServicePlanName value + */ + public String appServicePlanName() { + return this.appServicePlanName; + } + + /** + * Set the appServicePlanName value. + * + * @param appServicePlanName the appServicePlanName value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withAppServicePlanName(String appServicePlanName) { + this.appServicePlanName = appServicePlanName; + return this; + } + + /** + * Get the workerTierName value. + * + * @return the workerTierName value + */ + public String workerTierName() { + return this.workerTierName; + } + + /** + * Set the workerTierName value. + * + * @param workerTierName the workerTierName value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withWorkerTierName(String workerTierName) { + this.workerTierName = workerTierName; + return this; + } + + /** + * Get the status value. + * + * @return the status value + */ + public StatusOptions status() { + return this.status; + } + + /** + * Get the subscription value. + * + * @return the subscription value + */ + public String subscription() { + return this.subscription; + } + + /** + * Get the adminSiteName value. + * + * @return the adminSiteName value + */ + public String adminSiteName() { + return this.adminSiteName; + } + + /** + * Set the adminSiteName value. + * + * @param adminSiteName the adminSiteName value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withAdminSiteName(String adminSiteName) { + this.adminSiteName = adminSiteName; + return this; + } + + /** + * Get the hostingEnvironmentProfile value. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set the hostingEnvironmentProfile value. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get the maximumNumberOfWorkers value. + * + * @return the maximumNumberOfWorkers value + */ + public Integer maximumNumberOfWorkers() { + return this.maximumNumberOfWorkers; + } + + /** + * Get the geoRegion value. + * + * @return the geoRegion value + */ + public String geoRegion() { + return this.geoRegion; + } + + /** + * Get the perSiteScaling value. + * + * @return the perSiteScaling value + */ + public Boolean perSiteScaling() { + return this.perSiteScaling; + } + + /** + * Set the perSiteScaling value. + * + * @param perSiteScaling the perSiteScaling value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withPerSiteScaling(Boolean perSiteScaling) { + this.perSiteScaling = perSiteScaling; + return this; + } + + /** + * Get the numberOfSites value. + * + * @return the numberOfSites value + */ + public Integer numberOfSites() { + return this.numberOfSites; + } + + /** + * Get the isSpot value. + * + * @return the isSpot value + */ + public Boolean isSpot() { + return this.isSpot; + } + + /** + * Set the isSpot value. + * + * @param isSpot the isSpot value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withIsSpot(Boolean isSpot) { + this.isSpot = isSpot; + return this; + } + + /** + * Get the spotExpirationTime value. + * + * @return the spotExpirationTime value + */ + public DateTime spotExpirationTime() { + return this.spotExpirationTime; + } + + /** + * Set the spotExpirationTime value. + * + * @param spotExpirationTime the spotExpirationTime value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withSpotExpirationTime(DateTime spotExpirationTime) { + this.spotExpirationTime = spotExpirationTime; + return this; + } + + /** + * Get the resourceGroup value. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * 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 AppServicePlanInner object itself. + */ + public AppServicePlanInner withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + + /** + * Get the targetWorkerCount value. + * + * @return the targetWorkerCount value + */ + public Integer targetWorkerCount() { + return this.targetWorkerCount; + } + + /** + * Set the targetWorkerCount value. + * + * @param targetWorkerCount the targetWorkerCount value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withTargetWorkerCount(Integer targetWorkerCount) { + this.targetWorkerCount = targetWorkerCount; + return this; + } + + /** + * Get the targetWorkerSizeId value. + * + * @return the targetWorkerSizeId value + */ + public Integer targetWorkerSizeId() { + return this.targetWorkerSizeId; + } + + /** + * Set the targetWorkerSizeId value. + * + * @param targetWorkerSizeId the targetWorkerSizeId value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withTargetWorkerSizeId(Integer targetWorkerSizeId) { + this.targetWorkerSizeId = targetWorkerSizeId; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public SkuDescription sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withSku(SkuDescription sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServicePlanPatchResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServicePlanPatchResourceInner.java new file mode 100644 index 00000000000..84ae177d99c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServicePlanPatchResourceInner.java @@ -0,0 +1,399 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.StatusOptions; +import com.microsoft.azure.management.web.HostingEnvironmentProfile; +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * ARM resource for a app service plan. + */ +@JsonFlatten +public class AppServicePlanPatchResourceInner extends ProxyOnlyResource { + /** + * Name for the App Service plan. + */ + @JsonProperty(value = "properties.name", required = true) + private String appServicePlanPatchResourceName; + + /** + * Target worker tier assigned to the App Service plan. + */ + @JsonProperty(value = "properties.workerTierName") + private String workerTierName; + + /** + * App Service plan status. Possible values include: 'Ready', 'Pending', + * 'Creating'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private StatusOptions status; + + /** + * App Service plan subscription. + */ + @JsonProperty(value = "properties.subscription", access = JsonProperty.Access.WRITE_ONLY) + private String subscription; + + /** + * App Service plan administration site. + */ + @JsonProperty(value = "properties.adminSiteName") + private String adminSiteName; + + /** + * Specification for the App Service Environment to use for the App Service + * plan. + */ + @JsonProperty(value = "properties.hostingEnvironmentProfile") + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /** + * Maximum number of instances that can be assigned to this App Service + * plan. + */ + @JsonProperty(value = "properties.maximumNumberOfWorkers", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximumNumberOfWorkers; + + /** + * Geographical location for the App Service plan. + */ + @JsonProperty(value = "properties.geoRegion", access = JsonProperty.Access.WRITE_ONLY) + private String geoRegion; + + /** + * If <code>true</code>, apps assigned to this App Service plan + * can be scaled independently. + * If <code>false</code>, apps assigned to this App Service + * plan will scale to all instances of the plan. + */ + @JsonProperty(value = "properties.perSiteScaling") + private Boolean perSiteScaling; + + /** + * Number of apps assigned to this App Service plan. + */ + @JsonProperty(value = "properties.numberOfSites", access = JsonProperty.Access.WRITE_ONLY) + private Integer numberOfSites; + + /** + * If <code>true</code>, this App Service Plan owns spot + * instances. + */ + @JsonProperty(value = "properties.isSpot") + private Boolean isSpot; + + /** + * The time when the server farm expires. Valid only if it is a spot server + * farm. + */ + @JsonProperty(value = "properties.spotExpirationTime") + private DateTime spotExpirationTime; + + /** + * Resource group of the App Service plan. + */ + @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /** + * If Linux app service plan <code>true</code>, + * <code>false</code> otherwise. + */ + @JsonProperty(value = "properties.reserved") + private Boolean reserved; + + /** + * Scaling worker count. + */ + @JsonProperty(value = "properties.targetWorkerCount") + private Integer targetWorkerCount; + + /** + * Scaling worker size ID. + */ + @JsonProperty(value = "properties.targetWorkerSizeId") + private Integer targetWorkerSizeId; + + /** + * Provisioning state of the App Service Environment. Possible values + * include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Get the appServicePlanPatchResourceName value. + * + * @return the appServicePlanPatchResourceName value + */ + public String appServicePlanPatchResourceName() { + return this.appServicePlanPatchResourceName; + } + + /** + * Set the appServicePlanPatchResourceName value. + * + * @param appServicePlanPatchResourceName the appServicePlanPatchResourceName value to set + * @return the AppServicePlanPatchResourceInner object itself. + */ + public AppServicePlanPatchResourceInner withAppServicePlanPatchResourceName(String appServicePlanPatchResourceName) { + this.appServicePlanPatchResourceName = appServicePlanPatchResourceName; + return this; + } + + /** + * Get the workerTierName value. + * + * @return the workerTierName value + */ + public String workerTierName() { + return this.workerTierName; + } + + /** + * Set the workerTierName value. + * + * @param workerTierName the workerTierName value to set + * @return the AppServicePlanPatchResourceInner object itself. + */ + public AppServicePlanPatchResourceInner withWorkerTierName(String workerTierName) { + this.workerTierName = workerTierName; + return this; + } + + /** + * Get the status value. + * + * @return the status value + */ + public StatusOptions status() { + return this.status; + } + + /** + * Get the subscription value. + * + * @return the subscription value + */ + public String subscription() { + return this.subscription; + } + + /** + * Get the adminSiteName value. + * + * @return the adminSiteName value + */ + public String adminSiteName() { + return this.adminSiteName; + } + + /** + * Set the adminSiteName value. + * + * @param adminSiteName the adminSiteName value to set + * @return the AppServicePlanPatchResourceInner object itself. + */ + public AppServicePlanPatchResourceInner withAdminSiteName(String adminSiteName) { + this.adminSiteName = adminSiteName; + return this; + } + + /** + * Get the hostingEnvironmentProfile value. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set the hostingEnvironmentProfile value. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set + * @return the AppServicePlanPatchResourceInner object itself. + */ + public AppServicePlanPatchResourceInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get the maximumNumberOfWorkers value. + * + * @return the maximumNumberOfWorkers value + */ + public Integer maximumNumberOfWorkers() { + return this.maximumNumberOfWorkers; + } + + /** + * Get the geoRegion value. + * + * @return the geoRegion value + */ + public String geoRegion() { + return this.geoRegion; + } + + /** + * Get the perSiteScaling value. + * + * @return the perSiteScaling value + */ + public Boolean perSiteScaling() { + return this.perSiteScaling; + } + + /** + * Set the perSiteScaling value. + * + * @param perSiteScaling the perSiteScaling value to set + * @return the AppServicePlanPatchResourceInner object itself. + */ + public AppServicePlanPatchResourceInner withPerSiteScaling(Boolean perSiteScaling) { + this.perSiteScaling = perSiteScaling; + return this; + } + + /** + * Get the numberOfSites value. + * + * @return the numberOfSites value + */ + public Integer numberOfSites() { + return this.numberOfSites; + } + + /** + * Get the isSpot value. + * + * @return the isSpot value + */ + public Boolean isSpot() { + return this.isSpot; + } + + /** + * Set the isSpot value. + * + * @param isSpot the isSpot value to set + * @return the AppServicePlanPatchResourceInner object itself. + */ + public AppServicePlanPatchResourceInner withIsSpot(Boolean isSpot) { + this.isSpot = isSpot; + return this; + } + + /** + * Get the spotExpirationTime value. + * + * @return the spotExpirationTime value + */ + public DateTime spotExpirationTime() { + return this.spotExpirationTime; + } + + /** + * Set the spotExpirationTime value. + * + * @param spotExpirationTime the spotExpirationTime value to set + * @return the AppServicePlanPatchResourceInner object itself. + */ + public AppServicePlanPatchResourceInner withSpotExpirationTime(DateTime spotExpirationTime) { + this.spotExpirationTime = spotExpirationTime; + return this; + } + + /** + * Get the resourceGroup value. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * 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 AppServicePlanPatchResourceInner object itself. + */ + public AppServicePlanPatchResourceInner withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + + /** + * Get the targetWorkerCount value. + * + * @return the targetWorkerCount value + */ + public Integer targetWorkerCount() { + return this.targetWorkerCount; + } + + /** + * Set the targetWorkerCount value. + * + * @param targetWorkerCount the targetWorkerCount value to set + * @return the AppServicePlanPatchResourceInner object itself. + */ + public AppServicePlanPatchResourceInner withTargetWorkerCount(Integer targetWorkerCount) { + this.targetWorkerCount = targetWorkerCount; + return this; + } + + /** + * Get the targetWorkerSizeId value. + * + * @return the targetWorkerSizeId value + */ + public Integer targetWorkerSizeId() { + return this.targetWorkerSizeId; + } + + /** + * Set the targetWorkerSizeId value. + * + * @param targetWorkerSizeId the targetWorkerSizeId value to set + * @return the AppServicePlanPatchResourceInner object itself. + */ + public AppServicePlanPatchResourceInner withTargetWorkerSizeId(Integer targetWorkerSizeId) { + this.targetWorkerSizeId = targetWorkerSizeId; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServicePlansInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServicePlansInner.java new file mode 100644 index 00000000000..3ac58d4d45c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/AppServicePlansInner.java @@ -0,0 +1,4864 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AppServicePlans. + */ +public class AppServicePlansInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans list" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listByResourceGroup" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") + Observable> getByResourceGroup(@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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans createOrUpdate" }) + @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("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans beginCreateOrUpdate" }) + @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("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans delete" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServicePlanPatchResourceInner appServicePlan, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listCapabilities" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans getHybridConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans deleteHybridConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listHybridConnectionKeys" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listWebAppsByHybridConnection" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") + Observable> listWebAppsByHybridConnection(@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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans getHybridConnectionPlanLimit" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listHybridConnections" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listMetricDefintions" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listMetrics" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans restartWebApps" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listWebApps" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans getServerFarmSkus" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus") + Observable> getServerFarmSkus(@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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listUsages" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages") + Observable> listUsages(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listVnets" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans getVnetFromServerFarm" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans getVnetGateway" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans updateVnetGateway" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listRoutesForVnet" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") + Observable> listRoutesForVnet(@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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans getRouteForVnet" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans createOrUpdateVnetRoute" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans deleteVnetRoute" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans updateVnetRoute" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans rebootWorker" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listWebAppsByHybridConnectionNext" }) + @GET + Observable> listWebAppsByHybridConnectionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listHybridConnectionsNext" }) + @GET + Observable> listHybridConnectionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listMetricDefintionsNext" }) + @GET + Observable> listMetricDefintionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listMetricsNext" }) + @GET + Observable> listMetricsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listWebAppsNext" }) + @GET + Observable> listWebAppsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.AppServicePlans listUsagesNext" }) + @GET + Observable> listUsagesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is <code>false</code>, which returns a subset of the properties. + Retrieval of all properties may increase the API latency. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList list(final Boolean detailed) { + ServiceResponse> response = listSinglePageAsync(detailed).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is <code>false</code>, which returns a subset of the properties. + Retrieval of all properties may increase the API latency. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final Boolean detailed, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(detailed), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is <code>false</code>, which returns a subset of the properties. + Retrieval of all properties may increase the API latency. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is <code>false</code>, which returns a subset of the properties. + Retrieval of all properties may increase the API latency. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + ServiceResponse> * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is <code>false</code>, which returns a subset of the properties. + Retrieval of all properties may increase the API latency. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all App Service plans in a resource group. + * Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all App Service plans in a resource group. + * Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all App Service plans in a resource group. + * Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get all App Service plans in a resource group. + * Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all App Service plans in a resource group. + * Get all App Service plans in a resource group. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get an App Service plan. + * Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServicePlanInner object if successful. + */ + public AppServicePlanInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get an App Service plan. + * Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get an App Service plan. + * Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServicePlanInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1, AppServicePlanInner>() { + @Override + public AppServicePlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get an App Service plan. + * Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServicePlanInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(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.getByResourceGroup(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 = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, 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 the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServicePlanInner object if successful. + */ + public AppServicePlanInner createOrUpdate(String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan).toBlocking().last().body(); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan), serviceCallback); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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"; + Observable> observable = service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), appServicePlan, 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 the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServicePlanInner object if successful. + */ + public AppServicePlanInner beginCreateOrUpdate(String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan).toBlocking().single().body(); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan), serviceCallback); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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"; + return service.beginCreateOrUpdate(resourceGroupName, name, this.client.subscriptionId(), appServicePlan, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete an App Service plan. + * Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String name) { + deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Delete an App Service plan. + * Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Delete an App Service plan. + * Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an App Service plan. + * Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, 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 the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppServicePlanInner object if successful. + */ + public AppServicePlanInner update(String resourceGroupName, String name, AppServicePlanPatchResourceInner appServicePlan) { + return updateWithServiceResponseAsync(resourceGroupName, name, appServicePlan).toBlocking().single().body(); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String name, AppServicePlanPatchResourceInner appServicePlan, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, appServicePlan), serviceCallback); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServicePlanInner object + */ + public Observable updateAsync(String resourceGroupName, String name, AppServicePlanPatchResourceInner appServicePlan) { + return updateWithServiceResponseAsync(resourceGroupName, name, appServicePlan).map(new Func1, AppServicePlanInner>() { + @Override + public AppServicePlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppServicePlanInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, AppServicePlanPatchResourceInner 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"; + return service.update(resourceGroupName, name, this.client.subscriptionId(), appServicePlan, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List all capabilities of an App Service plan. + * List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<CapabilityInner> object if successful. + */ + public List listCapabilities(String resourceGroupName, String name) { + return listCapabilitiesWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * List all capabilities of an App Service plan. + * List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCapabilitiesAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listCapabilitiesWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * List all capabilities of an App Service plan. + * List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * List all capabilities of an App Service plan. + * List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieve a Hybrid Connection in use in an App Service plan. + * Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionInner object if successful. + */ + public HybridConnectionInner getHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + return getHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().body(); + } + + /** + * Retrieve a Hybrid Connection in use in an App Service plan. + * Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); + } + + /** + * Retrieve a Hybrid Connection in use in an App Service plan. + * Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Retrieve a Hybrid Connection in use in an App Service plan. + * Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a Hybrid Connection in use in an App Service plan. + * Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().body(); + } + + /** + * Delete a Hybrid Connection in use in an App Service plan. + * Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); + } + + /** + * Delete a Hybrid Connection in use in an App Service plan. + * Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + return deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a Hybrid Connection in use in an App Service plan. + * Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the send key name and value of a Hybrid Connection. + * Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionKeyInner object if successful. + */ + public HybridConnectionKeyInner listHybridConnectionKeys(String resourceGroupName, String name, String namespaceName, String relayName) { + return listHybridConnectionKeysWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().body(); + } + + /** + * Get the send key name and value of a Hybrid Connection. + * Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listHybridConnectionKeysAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listHybridConnectionKeysWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); + } + + /** + * Get the send key name and value of a Hybrid Connection. + * Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get the send key name and value of a Hybrid Connection. + * Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<String> object if successful. + */ + public PagedList listWebAppsByHybridConnection(final String resourceGroupName, final String name, final String namespaceName, final String relayName) { + ServiceResponse> response = listWebAppsByHybridConnectionSinglePageAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsByHybridConnectionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebAppsByHybridConnectionAsync(final String resourceGroupName, final String name, final String namespaceName, final String relayName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebAppsByHybridConnectionSinglePageAsync(resourceGroupName, name, namespaceName, relayName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsByHybridConnectionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<String> object + */ + public Observable> listWebAppsByHybridConnectionAsync(final String resourceGroupName, final String name, final String namespaceName, final String relayName) { + return listWebAppsByHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<String> object + */ + public Observable>> listWebAppsByHybridConnectionWithServiceResponseAsync(final String resourceGroupName, final String name, final String namespaceName, final String relayName) { + return listWebAppsByHybridConnectionSinglePageAsync(resourceGroupName, name, namespaceName, relayName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsByHybridConnectionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Get all apps that use a Hybrid Connection in an App Service Plan. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service plan. + ServiceResponse> * @param namespaceName Name of the Hybrid Connection namespace. + ServiceResponse> * @param relayName Name of the Hybrid Connection relay. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<String> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebAppsByHybridConnectionSinglePageAsync(final String resourceGroupName, final String name, final String namespaceName, final 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.listWebAppsByHybridConnection(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> result = listWebAppsByHybridConnectionDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebAppsByHybridConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the maximum number of Hybrid Connections allowed in an App Service plan. + * Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionLimitsInner object if successful. + */ + public HybridConnectionLimitsInner getHybridConnectionPlanLimit(String resourceGroupName, String name) { + return getHybridConnectionPlanLimitWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get the maximum number of Hybrid Connections allowed in an App Service plan. + * Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getHybridConnectionPlanLimitAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getHybridConnectionPlanLimitWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get the maximum number of Hybrid Connections allowed in an App Service plan. + * Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionLimitsInner object + */ + public Observable getHybridConnectionPlanLimitAsync(String resourceGroupName, String name) { + return getHybridConnectionPlanLimitWithServiceResponseAsync(resourceGroupName, name).map(new Func1, HybridConnectionLimitsInner>() { + @Override + public HybridConnectionLimitsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the maximum number of Hybrid Connections allowed in an App Service plan. + * Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionLimitsInner 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<HybridConnectionInner> object if successful. + */ + public PagedList listHybridConnections(final String resourceGroupName, final String name) { + ServiceResponse> response = listHybridConnectionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHybridConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listHybridConnectionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHybridConnectionsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHybridConnectionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HybridConnectionInner> object + */ + public Observable> listHybridConnectionsAsync(final String resourceGroupName, final String name) { + return listHybridConnectionsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HybridConnectionInner> object + */ + public Observable>> listHybridConnectionsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listHybridConnectionsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHybridConnectionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Retrieve all Hybrid Connections in use in an App Service plan. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<HybridConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listHybridConnectionsSinglePageAsync(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.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> result = listHybridConnectionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHybridConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metrics that can be queried for an App Service plan, and their definitions. + * Get metrics that can be queried for an App Service plan, and their definitions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listMetricDefintions(final String resourceGroupName, final String name) { + ServiceResponse> response = listMetricDefintionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics that can be queried for an App Service plan, and their definitions. + * Get metrics that can be queried for an App Service plan, and their definitions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricDefintionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricDefintionsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricDefintionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics that can be queried for an App Service plan, and their definitions. + * Get metrics that can be queried for an App Service plan, and their definitions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> 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.body(); + } + }); + } + + /** + * Get metrics that can be queried for an App Service plan, and their definitions. + * Get metrics that can be queried for an App Service plan, and their definitions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> 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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricDefintionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics that can be queried for an App Service plan, and their definitions. + * Get metrics that can be queried for an App Service plan, and their definitions. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricDefintionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMetrics(final String resourceGroupName, final String name) { + ServiceResponse> response = listMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSinglePageAsync(resourceGroupName, name, details, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + * @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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service plan. + ServiceResponse> * @param details Specify <code>true</code> to include instance details. The default is <code>false</code>. + 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Restart all apps in an App Service plan. + * Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restartWebApps(String resourceGroupName, String name) { + restartWebAppsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Restart all apps in an App Service plan. + * Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture restartWebAppsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartWebAppsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Restart all apps in an App Service plan. + * Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable restartWebAppsAsync(String resourceGroupName, String name) { + return restartWebAppsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restart all apps in an App Service plan. + * Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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); + } + } + }); + } + + /** + * Restart all apps in an App Service plan. + * Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param softRestart Specify <code>true</code> to performa a soft restart, applies the configuration settings and restarts the apps if necessary. The default is <code>false</code>, which always restarts and reprovisions the apps + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restartWebApps(String resourceGroupName, String name, Boolean softRestart) { + restartWebAppsWithServiceResponseAsync(resourceGroupName, name, softRestart).toBlocking().single().body(); + } + + /** + * Restart all apps in an App Service plan. + * Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param softRestart Specify <code>true</code> to performa a soft restart, applies the configuration settings and restarts the apps if necessary. The default is <code>false</code>, which always restarts and reprovisions the apps + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture restartWebAppsAsync(String resourceGroupName, String name, Boolean softRestart, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartWebAppsWithServiceResponseAsync(resourceGroupName, name, softRestart), serviceCallback); + } + + /** + * Restart all apps in an App Service plan. + * Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param softRestart Specify <code>true</code> to performa a soft restart, applies the configuration settings and restarts the apps if necessary. The default is <code>false</code>, which always restarts and reprovisions the apps + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable restartWebAppsAsync(String resourceGroupName, String name, Boolean softRestart) { + return restartWebAppsWithServiceResponseAsync(resourceGroupName, name, softRestart).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restart all apps in an App Service plan. + * Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param softRestart Specify <code>true</code> to performa a soft restart, applies the configuration settings and restarts the apps if necessary. The default is <code>false</code>, which always restarts and reprovisions the apps + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listWebApps(final String resourceGroupName, final String name) { + ServiceResponse> response = listWebAppsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebAppsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebAppsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the resulting list will contain web apps starting from (including) the skipToken. Otherwise, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the resulting list will contain web apps starting from (including) the skipToken. Otherwise, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebAppsAsync(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebAppsSinglePageAsync(resourceGroupName, name, skipToken, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the resulting list will contain web apps starting from (including) the skipToken. Otherwise, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the resulting list will contain web apps starting from (including) the skipToken. Otherwise, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service plan. + ServiceResponse> * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the resulting list will contain web apps starting from (including) the skipToken. Otherwise, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebAppsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all selectable sku's for a given App Service Plan. + * Gets all selectable sku's for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Object object if successful. + */ + public Object getServerFarmSkus(String resourceGroupName, String name) { + return getServerFarmSkusWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets all selectable sku's for a given App Service Plan. + * Gets all selectable sku's for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getServerFarmSkusAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getServerFarmSkusWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets all selectable sku's for a given App Service Plan. + * Gets all selectable sku's for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Object object + */ + public Observable getServerFarmSkusAsync(String resourceGroupName, String name) { + return getServerFarmSkusWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all selectable sku's for a given App Service Plan. + * Gets all selectable sku's for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Object object + */ + public Observable> getServerFarmSkusWithServiceResponseAsync(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.getServerFarmSkus(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 = getServerFarmSkusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getServerFarmSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmUsageQuotaInner> object if successful. + */ + public PagedList listUsages(final String resourceGroupName, final String name) { + ServiceResponse> response = listUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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-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) { + try { + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @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'). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @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'). + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesAsync(final String resourceGroupName, final String name, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesSinglePageAsync(resourceGroupName, name, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @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'). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan + * @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'). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of App Service Plan + 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'). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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-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) { + try { + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all Virtual Networks associated with an App Service plan. + * Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<VnetInfoInner> object if successful. + */ + public List listVnets(String resourceGroupName, String name) { + return listVnetsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get all Virtual Networks associated with an App Service plan. + * Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listVnetsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listVnetsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get all Virtual Networks associated with an App Service plan. + * Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get all Virtual Networks associated with an App Service plan. + * Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a Virtual Network associated with an App Service plan. + * Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner getVnetFromServerFarm(String resourceGroupName, String name, String vnetName) { + return getVnetFromServerFarmWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().body(); + } + + /** + * Get a Virtual Network associated with an App Service plan. + * Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getVnetFromServerFarmAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVnetFromServerFarmWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); + } + + /** + * Get a Virtual Network associated with an App Service plan. + * Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get a Virtual Network associated with an App Service plan. + * Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a Virtual Network gateway. + * Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VnetGatewayInner object if successful. + */ + public VnetGatewayInner getVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) { + return getVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).toBlocking().single().body(); + } + + /** + * Get a Virtual Network gateway. + * Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName), serviceCallback); + } + + /** + * Get a Virtual Network gateway. + * Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get a Virtual Network gateway. + * Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Update a Virtual Network gateway. + * Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 connectionEnvelope Definition of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the 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().body(); + } + + /** + * Update a Virtual Network gateway. + * Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 connectionEnvelope Definition of the gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope), serviceCallback); + } + + /** + * Update a Virtual Network gateway. + * Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 connectionEnvelope Definition of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Update a Virtual Network gateway. + * Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 connectionEnvelope Definition of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all routes that are associated with a Virtual Network in an App Service plan. + * Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<VnetRouteInner> object if successful. + */ + public List listRoutesForVnet(String resourceGroupName, String name, String vnetName) { + return listRoutesForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().body(); + } + + /** + * Get all routes that are associated with a Virtual Network in an App Service plan. + * Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listRoutesForVnetAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listRoutesForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); + } + + /** + * Get all routes that are associated with a Virtual Network in an App Service plan. + * Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<VnetRouteInner> object + */ + public Observable> listRoutesForVnetAsync(String resourceGroupName, String name, String vnetName) { + return listRoutesForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all routes that are associated with a Virtual Network in an App Service plan. + * Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<VnetRouteInner> object + */ + public Observable>> listRoutesForVnetWithServiceResponseAsync(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.listRoutesForVnet(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 = listRoutesForVnetDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRoutesForVnetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a Virtual Network route in an App Service plan. + * Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<VnetRouteInner> object if successful. + */ + public List getRouteForVnet(String resourceGroupName, String name, String vnetName, String routeName) { + return getRouteForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).toBlocking().single().body(); + } + + /** + * Get a Virtual Network route in an App Service plan. + * Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getRouteForVnetAsync(String resourceGroupName, String name, String vnetName, String routeName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(getRouteForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName), serviceCallback); + } + + /** + * Get a Virtual Network route in an App Service plan. + * Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get a Virtual Network route in an App Service plan. + * Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a Virtual Network route in an App Service plan. + * Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the 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().body(); + } + + /** + * Create or update a Virtual Network route in an App Service plan. + * Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route), serviceCallback); + } + + /** + * Create or update a Virtual Network route in an App Service plan. + * Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Create or update a Virtual Network route in an App Service plan. + * Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(400, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a Virtual Network route in an App Service plan. + * Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteVnetRoute(String resourceGroupName, String name, String vnetName, String routeName) { + deleteVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).toBlocking().single().body(); + } + + /** + * Delete a Virtual Network route in an App Service plan. + * Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName), serviceCallback); + } + + /** + * Delete a Virtual Network route in an App Service plan. + * Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName) { + return deleteVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a Virtual Network route in an App Service plan. + * Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a Virtual Network route in an App Service plan. + * Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the 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().body(); + } + + /** + * Create or update a Virtual Network route in an App Service plan. + * Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route), serviceCallback); + } + + /** + * Create or update a Virtual Network route in an App Service plan. + * Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Create or update a Virtual Network route in an App Service plan. + * Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(400, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reboot a worker machine in an App Service plan. + * Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void rebootWorker(String resourceGroupName, String name, String workerName) { + rebootWorkerWithServiceResponseAsync(resourceGroupName, name, workerName).toBlocking().single().body(); + } + + /** + * Reboot a worker machine in an App Service plan. + * Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture rebootWorkerAsync(String resourceGroupName, String name, String workerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(rebootWorkerWithServiceResponseAsync(resourceGroupName, name, workerName), serviceCallback); + } + + /** + * Reboot a worker machine in an App Service plan. + * Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable rebootWorkerAsync(String resourceGroupName, String name, String workerName) { + return rebootWorkerWithServiceResponseAsync(resourceGroupName, name, workerName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reboot a worker machine in an App Service plan. + * Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all App Service plans for a subcription. + * Get all App Service plans for a subcription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all App Service plans in a resource group. + * Get all App Service plans in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all App Service plans in a resource group. + * Get all App Service plans in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all App Service plans in a resource group. + * Get all App Service plans in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all App Service plans in a resource group. + * Get all App Service plans in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all App Service plans in a resource group. + * Get all App Service plans in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<String> object if successful. + */ + public PagedList listWebAppsByHybridConnectionNext(final String nextPageLink) { + ServiceResponse> response = listWebAppsByHybridConnectionNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsByHybridConnectionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebAppsByHybridConnectionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebAppsByHybridConnectionNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsByHybridConnectionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<String> object + */ + public Observable> listWebAppsByHybridConnectionNextAsync(final String nextPageLink) { + return listWebAppsByHybridConnectionNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<String> object + */ + public Observable>> listWebAppsByHybridConnectionNextWithServiceResponseAsync(final String nextPageLink) { + return listWebAppsByHybridConnectionNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsByHybridConnectionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Get all apps that use a Hybrid Connection in an App Service Plan. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<String> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebAppsByHybridConnectionNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWebAppsByHybridConnectionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebAppsByHybridConnectionNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebAppsByHybridConnectionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<HybridConnectionInner> object if successful. + */ + public PagedList listHybridConnectionsNext(final String nextPageLink) { + ServiceResponse> response = listHybridConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHybridConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listHybridConnectionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHybridConnectionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHybridConnectionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HybridConnectionInner> object + */ + public Observable> listHybridConnectionsNextAsync(final String nextPageLink) { + return listHybridConnectionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HybridConnectionInner> object + */ + public Observable>> listHybridConnectionsNextWithServiceResponseAsync(final String nextPageLink) { + return listHybridConnectionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHybridConnectionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Retrieve all Hybrid Connections in use in an App Service plan. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<HybridConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listHybridConnectionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listHybridConnectionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHybridConnectionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHybridConnectionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metrics that can be queried for an App Service plan, and their definitions. + * Get metrics that can be queried for an App Service plan, and their definitions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listMetricDefintionsNext(final String nextPageLink) { + ServiceResponse> response = listMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics that can be queried for an App Service plan, and their definitions. + * Get metrics that can be queried for an App Service plan, and their definitions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricDefintionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricDefintionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricDefintionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics that can be queried for an App Service plan, and their definitions. + * Get metrics that can be queried for an App Service plan, and their definitions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable> listMetricDefintionsNextAsync(final String nextPageLink) { + return listMetricDefintionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metrics that can be queried for an App Service plan, and their definitions. + * Get metrics that can be queried for an App Service plan, and their definitions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable>> listMetricDefintionsNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricDefintionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricDefintionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics that can be queried for an App Service plan, and their definitions. + * Get metrics that can be queried for an App Service plan, and their definitions. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> 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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMetricDefintionsNext(nextUrl, 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricDefintionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMetricsNext(final String nextPageLink) { + ServiceResponse> response = listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMetricsNextAsync(final String nextPageLink) { + return listMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metrics for an App Serice plan. + * Get metrics for an App Serice plan. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMetricsNext(nextUrl, 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listWebAppsNext(final String nextPageLink) { + ServiceResponse> response = listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebAppsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebAppsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listWebAppsNextAsync(final String nextPageLink) { + return listWebAppsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listWebAppsNextWithServiceResponseAsync(final String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all apps associated with an App Service plan. + * Get all apps associated with an App Service plan. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWebAppsNext(nextUrl, 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebAppsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmUsageQuotaInner> object if successful. + */ + public PagedList listUsagesNext(final String nextPageLink) { + ServiceResponse> response = listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable> listUsagesNextAsync(final String nextPageLink) { + return listUsagesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable>> listUsagesNextWithServiceResponseAsync(final String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets server farm usage information. + * Gets server farm usage information. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listUsagesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listUsagesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ApplicationStackInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ApplicationStackInner.java new file mode 100644 index 00000000000..c8496fb3372 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ApplicationStackInner.java @@ -0,0 +1,149 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.microsoft.azure.management.web.StackMajorVersion; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application stack. + */ +public class ApplicationStackInner { + /** + * Application stack name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Application stack display name. + */ + @JsonProperty(value = "display") + private String display; + + /** + * Application stack dependency. + */ + @JsonProperty(value = "dependency") + private String dependency; + + /** + * List of major versions available. + */ + @JsonProperty(value = "majorVersions") + private List majorVersions; + + /** + * List of frameworks associated with application stack. + */ + @JsonProperty(value = "frameworks") + private List frameworks; + + /** + * 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 ApplicationStackInner object itself. + */ + public ApplicationStackInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display value. + * + * @return the display value + */ + public String display() { + return this.display; + } + + /** + * Set the display value. + * + * @param display the display value to set + * @return the ApplicationStackInner object itself. + */ + public ApplicationStackInner withDisplay(String display) { + this.display = display; + return this; + } + + /** + * Get the dependency value. + * + * @return the dependency value + */ + public String dependency() { + return this.dependency; + } + + /** + * Set the dependency value. + * + * @param dependency the dependency value to set + * @return the ApplicationStackInner object itself. + */ + public ApplicationStackInner withDependency(String dependency) { + this.dependency = dependency; + return this; + } + + /** + * Get the majorVersions value. + * + * @return the majorVersions value + */ + public List majorVersions() { + return this.majorVersions; + } + + /** + * Set the majorVersions value. + * + * @param majorVersions the majorVersions value to set + * @return the ApplicationStackInner object itself. + */ + public ApplicationStackInner withMajorVersions(List majorVersions) { + this.majorVersions = majorVersions; + return this; + } + + /** + * Get the frameworks value. + * + * @return the frameworks value + */ + public List frameworks() { + return this.frameworks; + } + + /** + * Set the frameworks value. + * + * @param frameworks the frameworks value to set + * @return the ApplicationStackInner object itself. + */ + public ApplicationStackInner withFrameworks(List frameworks) { + this.frameworks = frameworks; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/BackupItemInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/BackupItemInner.java new file mode 100644 index 00000000000..8bfa9b84372 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/BackupItemInner.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.microsoft.azure.management.web.BackupItemStatus; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.web.DatabaseBackupSetting; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Backup description. + */ +@JsonFlatten +public class BackupItemInner extends ProxyOnlyResource { + /** + * Id of the backup. + */ + @JsonProperty(value = "properties.id", access = JsonProperty.Access.WRITE_ONLY) + private Integer backupId; + + /** + * SAS URL for the storage account container which contains this backup. + */ + @JsonProperty(value = "properties.storageAccountUrl", access = JsonProperty.Access.WRITE_ONLY) + private String storageAccountUrl; + + /** + * Name of the blob which contains data for this backup. + */ + @JsonProperty(value = "properties.blobName", access = JsonProperty.Access.WRITE_ONLY) + private String blobName; + + /** + * Name of this backup. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private String backupItemName; + + /** + * Backup status. Possible values include: 'InProgress', 'Failed', + * 'Succeeded', 'TimedOut', 'Created', 'Skipped', 'PartiallySucceeded', + * 'DeleteInProgress', 'DeleteFailed', 'Deleted'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private BackupItemStatus status; + + /** + * Size of the backup in bytes. + */ + @JsonProperty(value = "properties.sizeInBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long sizeInBytes; + + /** + * Timestamp of the backup creation. + */ + @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) + private DateTime created; + + /** + * Details regarding this backup. Might contain an error message. + */ + @JsonProperty(value = "properties.log", access = JsonProperty.Access.WRITE_ONLY) + private String log; + + /** + * List of databases included in the backup. + */ + @JsonProperty(value = "properties.databases", access = JsonProperty.Access.WRITE_ONLY) + private List databases; + + /** + * True if this backup has been created due to a schedule being triggered. + */ + @JsonProperty(value = "properties.scheduled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean scheduled; + + /** + * Timestamp of a last restore operation which used this backup. + */ + @JsonProperty(value = "properties.lastRestoreTimeStamp", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastRestoreTimeStamp; + + /** + * Timestamp when this backup finished. + */ + @JsonProperty(value = "properties.finishedTimeStamp", access = JsonProperty.Access.WRITE_ONLY) + private DateTime finishedTimeStamp; + + /** + * Unique correlation identifier. Please use this along with the timestamp + * while communicating with Azure support. + */ + @JsonProperty(value = "properties.correlationId", access = JsonProperty.Access.WRITE_ONLY) + private String correlationId; + + /** + * Size of the original web app which has been backed up. + */ + @JsonProperty(value = "properties.websiteSizeInBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long websiteSizeInBytes; + + /** + * Get the backupId value. + * + * @return the backupId value + */ + public Integer backupId() { + return this.backupId; + } + + /** + * Get the storageAccountUrl value. + * + * @return the storageAccountUrl value + */ + public String storageAccountUrl() { + return this.storageAccountUrl; + } + + /** + * Get the blobName value. + * + * @return the blobName value + */ + public String blobName() { + return this.blobName; + } + + /** + * Get the backupItemName value. + * + * @return the backupItemName value + */ + public String backupItemName() { + return this.backupItemName; + } + + /** + * Get the status value. + * + * @return the status value + */ + public BackupItemStatus status() { + return this.status; + } + + /** + * Get the sizeInBytes value. + * + * @return the sizeInBytes value + */ + public Long sizeInBytes() { + return this.sizeInBytes; + } + + /** + * Get the created value. + * + * @return the created value + */ + public DateTime created() { + return this.created; + } + + /** + * Get the log value. + * + * @return the log value + */ + public String log() { + return this.log; + } + + /** + * Get the databases value. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Get the scheduled value. + * + * @return the scheduled value + */ + public Boolean scheduled() { + return this.scheduled; + } + + /** + * Get the lastRestoreTimeStamp value. + * + * @return the lastRestoreTimeStamp value + */ + public DateTime lastRestoreTimeStamp() { + return this.lastRestoreTimeStamp; + } + + /** + * Get the finishedTimeStamp value. + * + * @return the finishedTimeStamp value + */ + public DateTime finishedTimeStamp() { + return this.finishedTimeStamp; + } + + /** + * Get the correlationId value. + * + * @return the correlationId value + */ + public String correlationId() { + return this.correlationId; + } + + /** + * Get the websiteSizeInBytes value. + * + * @return the websiteSizeInBytes value + */ + public Long websiteSizeInBytes() { + return this.websiteSizeInBytes; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/BackupRequestInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/BackupRequestInner.java new file mode 100644 index 00000000000..e72b5711958 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/BackupRequestInner.java @@ -0,0 +1,182 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.BackupSchedule; +import java.util.List; +import com.microsoft.azure.management.web.DatabaseBackupSetting; +import com.microsoft.azure.management.web.BackupRestoreOperationType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Description of a backup which will be performed. + */ +@JsonFlatten +public class BackupRequestInner extends ProxyOnlyResource { + /** + * Name of the backup. + */ + @JsonProperty(value = "properties.name", required = true) + private String backupRequestName; + + /** + * True if the backup schedule is enabled (must be included in that case), + * false if the backup schedule should be disabled. + */ + @JsonProperty(value = "properties.enabled") + private Boolean enabled; + + /** + * SAS URL to the container. + */ + @JsonProperty(value = "properties.storageAccountUrl", required = true) + private String storageAccountUrl; + + /** + * Schedule for the backup if it is executed periodically. + */ + @JsonProperty(value = "properties.backupSchedule") + private BackupSchedule backupSchedule; + + /** + * Databases included in the backup. + */ + @JsonProperty(value = "properties.databases") + private List databases; + + /** + * Type of the backup. Possible values include: 'Default', 'Clone', + * 'Relocation', 'Snapshot'. + */ + @JsonProperty(value = "properties.type") + private BackupRestoreOperationType backupRequestType; + + /** + * Get the backupRequestName value. + * + * @return the backupRequestName value + */ + public String backupRequestName() { + return this.backupRequestName; + } + + /** + * Set the backupRequestName value. + * + * @param backupRequestName the backupRequestName value to set + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withBackupRequestName(String backupRequestName) { + this.backupRequestName = backupRequestName; + return this; + } + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the storageAccountUrl value. + * + * @return the storageAccountUrl value + */ + public String storageAccountUrl() { + return this.storageAccountUrl; + } + + /** + * Set the storageAccountUrl value. + * + * @param storageAccountUrl the storageAccountUrl value to set + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withStorageAccountUrl(String storageAccountUrl) { + this.storageAccountUrl = storageAccountUrl; + return this; + } + + /** + * Get the backupSchedule value. + * + * @return the backupSchedule value + */ + public BackupSchedule backupSchedule() { + return this.backupSchedule; + } + + /** + * Set the backupSchedule value. + * + * @param backupSchedule the backupSchedule value to set + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withBackupSchedule(BackupSchedule backupSchedule) { + this.backupSchedule = backupSchedule; + return this; + } + + /** + * Get the databases value. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Set the databases value. + * + * @param databases the databases value to set + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withDatabases(List databases) { + this.databases = databases; + return this; + } + + /** + * Get the backupRequestType value. + * + * @return the backupRequestType value + */ + public BackupRestoreOperationType backupRequestType() { + return this.backupRequestType; + } + + /** + * Set the backupRequestType value. + * + * @param backupRequestType the backupRequestType value to set + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withBackupRequestType(BackupRestoreOperationType backupRequestType) { + this.backupRequestType = backupRequestType; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CapabilityInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CapabilityInner.java new file mode 100644 index 00000000000..bf66e88e90f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CapabilityInner.java @@ -0,0 +1,95 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the capabilities/features allowed for a specific SKU. + */ +public class CapabilityInner { + /** + * Name of the SKU capability. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Value of the SKU capability. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Reason of the SKU capability. + */ + @JsonProperty(value = "reason") + 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-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateEmailInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateEmailInner.java new file mode 100644 index 00000000000..8ab715e0695 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateEmailInner.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.web.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * SSL certificate email. + */ +@JsonFlatten +public class CertificateEmailInner extends ProxyOnlyResource { + /** + * Email id. + */ + @JsonProperty(value = "properties.emailId") + private String emailId; + + /** + * Time stamp. + */ + @JsonProperty(value = "properties.timeStamp") + private DateTime timeStamp; + + /** + * Get the emailId value. + * + * @return the emailId value + */ + public String emailId() { + return this.emailId; + } + + /** + * Set the emailId value. + * + * @param emailId the emailId value to set + * @return the CertificateEmailInner object itself. + */ + public CertificateEmailInner withEmailId(String emailId) { + this.emailId = emailId; + return this; + } + + /** + * Get the timeStamp value. + * + * @return the timeStamp value + */ + public DateTime timeStamp() { + return this.timeStamp; + } + + /** + * Set the timeStamp value. + * + * @param timeStamp the timeStamp value to set + * @return the CertificateEmailInner object itself. + */ + public CertificateEmailInner withTimeStamp(DateTime timeStamp) { + this.timeStamp = timeStamp; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateInner.java new file mode 100644 index 00000000000..5825898ba48 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateInner.java @@ -0,0 +1,397 @@ +/** + * 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.web.implementation; + +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.HostingEnvironmentProfile; +import com.microsoft.azure.management.web.KeyVaultSecretStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * SSL certificate for an app. + */ +@JsonFlatten +public class CertificateInner extends Resource { + /** + * Friendly name of the certificate. + */ + @JsonProperty(value = "properties.friendlyName", access = JsonProperty.Access.WRITE_ONLY) + private String friendlyName; + + /** + * Subject name of the certificate. + */ + @JsonProperty(value = "properties.subjectName", access = JsonProperty.Access.WRITE_ONLY) + private String subjectName; + + /** + * Host names the certificate applies to. + */ + @JsonProperty(value = "properties.hostNames") + private List hostNames; + + /** + * Pfx blob. + */ + @JsonProperty(value = "properties.pfxBlob") + private byte[] pfxBlob; + + /** + * App name. + */ + @JsonProperty(value = "properties.siteName", access = JsonProperty.Access.WRITE_ONLY) + private String siteName; + + /** + * Self link. + */ + @JsonProperty(value = "properties.selfLink", access = JsonProperty.Access.WRITE_ONLY) + private String selfLink; + + /** + * Certificate issuer. + */ + @JsonProperty(value = "properties.issuer", access = JsonProperty.Access.WRITE_ONLY) + private String issuer; + + /** + * Certificate issue Date. + */ + @JsonProperty(value = "properties.issueDate", access = JsonProperty.Access.WRITE_ONLY) + private DateTime issueDate; + + /** + * Certificate expriration date. + */ + @JsonProperty(value = "properties.expirationDate", access = JsonProperty.Access.WRITE_ONLY) + private DateTime expirationDate; + + /** + * Certificate password. + */ + @JsonProperty(value = "properties.password", required = true) + private String password; + + /** + * Certificate thumbprint. + */ + @JsonProperty(value = "properties.thumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String thumbprint; + + /** + * Is the certificate valid?. + */ + @JsonProperty(value = "properties.valid", access = JsonProperty.Access.WRITE_ONLY) + private Boolean valid; + + /** + * Raw bytes of .cer file. + */ + @JsonProperty(value = "properties.cerBlob", access = JsonProperty.Access.WRITE_ONLY) + private byte[] cerBlob; + + /** + * Public key hash. + */ + @JsonProperty(value = "properties.publicKeyHash", access = JsonProperty.Access.WRITE_ONLY) + private String publicKeyHash; + + /** + * Specification for the App Service Environment to use for the + * certificate. + */ + @JsonProperty(value = "properties.hostingEnvironmentProfile", access = JsonProperty.Access.WRITE_ONLY) + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /** + * Key Vault Csm resource Id. + */ + @JsonProperty(value = "properties.keyVaultId") + private String keyVaultId; + + /** + * Key Vault secret name. + */ + @JsonProperty(value = "properties.keyVaultSecretName") + private String keyVaultSecretName; + + /** + * Status of the Key Vault secret. Possible values include: 'Initialized', + * 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', + * 'OperationNotPermittedOnKeyVault', + * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', + * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', + * 'Unknown'. + */ + @JsonProperty(value = "properties.keyVaultSecretStatus", access = JsonProperty.Access.WRITE_ONLY) + private KeyVaultSecretStatus keyVaultSecretStatus; + + /** + * Region of the certificate. + */ + @JsonProperty(value = "properties.geoRegion", access = JsonProperty.Access.WRITE_ONLY) + private String geoRegion; + + /** + * Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + */ + @JsonProperty(value = "properties.serverFarmId") + private String serverFarmId; + + /** + * Get the friendlyName value. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Get the subjectName value. + * + * @return the subjectName value + */ + public String subjectName() { + return this.subjectName; + } + + /** + * Get the hostNames value. + * + * @return the hostNames value + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Set the hostNames value. + * + * @param hostNames the hostNames value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withHostNames(List hostNames) { + this.hostNames = hostNames; + return this; + } + + /** + * Get the pfxBlob value. + * + * @return the pfxBlob value + */ + public byte[] pfxBlob() { + return this.pfxBlob; + } + + /** + * Set the pfxBlob value. + * + * @param pfxBlob the pfxBlob value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withPfxBlob(byte[] pfxBlob) { + this.pfxBlob = pfxBlob; + return this; + } + + /** + * Get the siteName value. + * + * @return the siteName value + */ + public String siteName() { + return this.siteName; + } + + /** + * Get the selfLink value. + * + * @return the selfLink value + */ + public String selfLink() { + return this.selfLink; + } + + /** + * Get the issuer value. + * + * @return the issuer value + */ + public String issuer() { + return this.issuer; + } + + /** + * Get the issueDate value. + * + * @return the issueDate value + */ + public DateTime issueDate() { + return this.issueDate; + } + + /** + * Get the expirationDate value. + * + * @return the expirationDate value + */ + public DateTime expirationDate() { + return this.expirationDate; + } + + /** + * Get the password value. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the password value. + * + * @param password the password value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the thumbprint value. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Get the valid value. + * + * @return the valid value + */ + public Boolean valid() { + return this.valid; + } + + /** + * Get the cerBlob value. + * + * @return the cerBlob value + */ + public byte[] cerBlob() { + return this.cerBlob; + } + + /** + * Get the publicKeyHash value. + * + * @return the publicKeyHash value + */ + public String publicKeyHash() { + return this.publicKeyHash; + } + + /** + * Get the hostingEnvironmentProfile value. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Get the keyVaultId value. + * + * @return the keyVaultId value + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set the keyVaultId value. + * + * @param keyVaultId the keyVaultId value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get the keyVaultSecretName value. + * + * @return the keyVaultSecretName value + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set the keyVaultSecretName value. + * + * @param keyVaultSecretName the keyVaultSecretName value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get the keyVaultSecretStatus value. + * + * @return the keyVaultSecretStatus value + */ + public KeyVaultSecretStatus keyVaultSecretStatus() { + return this.keyVaultSecretStatus; + } + + /** + * Get the geoRegion value. + * + * @return the geoRegion value + */ + public String geoRegion() { + return this.geoRegion; + } + + /** + * 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 CertificateInner object itself. + */ + public CertificateInner withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateOrderActionInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateOrderActionInner.java new file mode 100644 index 00000000000..6acd5ce6b89 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateOrderActionInner.java @@ -0,0 +1,79 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.CertificateOrderActionType; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Certificate order action. + */ +@JsonFlatten +public class CertificateOrderActionInner extends ProxyOnlyResource { + /** + * Action type. Possible values include: 'CertificateIssued', + * 'CertificateOrderCanceled', 'CertificateOrderCreated', + * 'CertificateRevoked', 'DomainValidationComplete', 'FraudDetected', + * 'OrgNameChange', 'OrgValidationComplete', 'SanDrop', 'FraudCleared', + * 'CertificateExpired', 'CertificateExpirationWarning', + * 'FraudDocumentationRequired', 'Unknown'. + */ + @JsonProperty(value = "properties.type") + private CertificateOrderActionType certificateOrderActionType; + + /** + * Time at which the certificate action was performed. + */ + @JsonProperty(value = "properties.createdAt") + private DateTime createdAt; + + /** + * Get the certificateOrderActionType value. + * + * @return the certificateOrderActionType value + */ + public CertificateOrderActionType certificateOrderActionType() { + return this.certificateOrderActionType; + } + + /** + * Set the certificateOrderActionType value. + * + * @param certificateOrderActionType the certificateOrderActionType value to set + * @return the CertificateOrderActionInner object itself. + */ + public CertificateOrderActionInner withCertificateOrderActionType(CertificateOrderActionType certificateOrderActionType) { + this.certificateOrderActionType = certificateOrderActionType; + return this; + } + + /** + * Get the createdAt value. + * + * @return the createdAt value + */ + public DateTime createdAt() { + return this.createdAt; + } + + /** + * Set the createdAt value. + * + * @param createdAt the createdAt value to set + * @return the CertificateOrderActionInner object itself. + */ + public CertificateOrderActionInner withCreatedAt(DateTime createdAt) { + this.createdAt = createdAt; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificatePatchResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificatePatchResourceInner.java new file mode 100644 index 00000000000..491320d9f8f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificatePatchResourceInner.java @@ -0,0 +1,397 @@ +/** + * 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.web.implementation; + +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.HostingEnvironmentProfile; +import com.microsoft.azure.management.web.KeyVaultSecretStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * ARM resource for a certificate. + */ +@JsonFlatten +public class CertificatePatchResourceInner extends ProxyOnlyResource { + /** + * Friendly name of the certificate. + */ + @JsonProperty(value = "properties.friendlyName", access = JsonProperty.Access.WRITE_ONLY) + private String friendlyName; + + /** + * Subject name of the certificate. + */ + @JsonProperty(value = "properties.subjectName", access = JsonProperty.Access.WRITE_ONLY) + private String subjectName; + + /** + * Host names the certificate applies to. + */ + @JsonProperty(value = "properties.hostNames") + private List hostNames; + + /** + * Pfx blob. + */ + @JsonProperty(value = "properties.pfxBlob") + private byte[] pfxBlob; + + /** + * App name. + */ + @JsonProperty(value = "properties.siteName", access = JsonProperty.Access.WRITE_ONLY) + private String siteName; + + /** + * Self link. + */ + @JsonProperty(value = "properties.selfLink", access = JsonProperty.Access.WRITE_ONLY) + private String selfLink; + + /** + * Certificate issuer. + */ + @JsonProperty(value = "properties.issuer", access = JsonProperty.Access.WRITE_ONLY) + private String issuer; + + /** + * Certificate issue Date. + */ + @JsonProperty(value = "properties.issueDate", access = JsonProperty.Access.WRITE_ONLY) + private DateTime issueDate; + + /** + * Certificate expriration date. + */ + @JsonProperty(value = "properties.expirationDate", access = JsonProperty.Access.WRITE_ONLY) + private DateTime expirationDate; + + /** + * Certificate password. + */ + @JsonProperty(value = "properties.password", required = true) + private String password; + + /** + * Certificate thumbprint. + */ + @JsonProperty(value = "properties.thumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String thumbprint; + + /** + * Is the certificate valid?. + */ + @JsonProperty(value = "properties.valid", access = JsonProperty.Access.WRITE_ONLY) + private Boolean valid; + + /** + * Raw bytes of .cer file. + */ + @JsonProperty(value = "properties.cerBlob", access = JsonProperty.Access.WRITE_ONLY) + private byte[] cerBlob; + + /** + * Public key hash. + */ + @JsonProperty(value = "properties.publicKeyHash", access = JsonProperty.Access.WRITE_ONLY) + private String publicKeyHash; + + /** + * Specification for the App Service Environment to use for the + * certificate. + */ + @JsonProperty(value = "properties.hostingEnvironmentProfile", access = JsonProperty.Access.WRITE_ONLY) + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /** + * Key Vault Csm resource Id. + */ + @JsonProperty(value = "properties.keyVaultId") + private String keyVaultId; + + /** + * Key Vault secret name. + */ + @JsonProperty(value = "properties.keyVaultSecretName") + private String keyVaultSecretName; + + /** + * Status of the Key Vault secret. Possible values include: 'Initialized', + * 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', + * 'OperationNotPermittedOnKeyVault', + * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', + * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', + * 'Unknown'. + */ + @JsonProperty(value = "properties.keyVaultSecretStatus", access = JsonProperty.Access.WRITE_ONLY) + private KeyVaultSecretStatus keyVaultSecretStatus; + + /** + * Region of the certificate. + */ + @JsonProperty(value = "properties.geoRegion", access = JsonProperty.Access.WRITE_ONLY) + private String geoRegion; + + /** + * Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + */ + @JsonProperty(value = "properties.serverFarmId") + private String serverFarmId; + + /** + * Get the friendlyName value. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Get the subjectName value. + * + * @return the subjectName value + */ + public String subjectName() { + return this.subjectName; + } + + /** + * Get the hostNames value. + * + * @return the hostNames value + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Set the hostNames value. + * + * @param hostNames the hostNames value to set + * @return the CertificatePatchResourceInner object itself. + */ + public CertificatePatchResourceInner withHostNames(List hostNames) { + this.hostNames = hostNames; + return this; + } + + /** + * Get the pfxBlob value. + * + * @return the pfxBlob value + */ + public byte[] pfxBlob() { + return this.pfxBlob; + } + + /** + * Set the pfxBlob value. + * + * @param pfxBlob the pfxBlob value to set + * @return the CertificatePatchResourceInner object itself. + */ + public CertificatePatchResourceInner withPfxBlob(byte[] pfxBlob) { + this.pfxBlob = pfxBlob; + return this; + } + + /** + * Get the siteName value. + * + * @return the siteName value + */ + public String siteName() { + return this.siteName; + } + + /** + * Get the selfLink value. + * + * @return the selfLink value + */ + public String selfLink() { + return this.selfLink; + } + + /** + * Get the issuer value. + * + * @return the issuer value + */ + public String issuer() { + return this.issuer; + } + + /** + * Get the issueDate value. + * + * @return the issueDate value + */ + public DateTime issueDate() { + return this.issueDate; + } + + /** + * Get the expirationDate value. + * + * @return the expirationDate value + */ + public DateTime expirationDate() { + return this.expirationDate; + } + + /** + * Get the password value. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the password value. + * + * @param password the password value to set + * @return the CertificatePatchResourceInner object itself. + */ + public CertificatePatchResourceInner withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the thumbprint value. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Get the valid value. + * + * @return the valid value + */ + public Boolean valid() { + return this.valid; + } + + /** + * Get the cerBlob value. + * + * @return the cerBlob value + */ + public byte[] cerBlob() { + return this.cerBlob; + } + + /** + * Get the publicKeyHash value. + * + * @return the publicKeyHash value + */ + public String publicKeyHash() { + return this.publicKeyHash; + } + + /** + * Get the hostingEnvironmentProfile value. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Get the keyVaultId value. + * + * @return the keyVaultId value + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set the keyVaultId value. + * + * @param keyVaultId the keyVaultId value to set + * @return the CertificatePatchResourceInner object itself. + */ + public CertificatePatchResourceInner withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get the keyVaultSecretName value. + * + * @return the keyVaultSecretName value + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set the keyVaultSecretName value. + * + * @param keyVaultSecretName the keyVaultSecretName value to set + * @return the CertificatePatchResourceInner object itself. + */ + public CertificatePatchResourceInner withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get the keyVaultSecretStatus value. + * + * @return the keyVaultSecretStatus value + */ + public KeyVaultSecretStatus keyVaultSecretStatus() { + return this.keyVaultSecretStatus; + } + + /** + * Get the geoRegion value. + * + * @return the geoRegion value + */ + public String geoRegion() { + return this.geoRegion; + } + + /** + * 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 CertificatePatchResourceInner object itself. + */ + public CertificatePatchResourceInner withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateRegistrationProvidersInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateRegistrationProvidersInner.java new file mode 100644 index 00000000000..510520b5ec8 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificateRegistrationProvidersInner.java @@ -0,0 +1,291 @@ +/** + * 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.web.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in CertificateRegistrationProviders. + */ +public class CertificateRegistrationProvidersInner { + /** The Retrofit service to perform REST calls. */ + private CertificateRegistrationProvidersService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * Initializes an instance of CertificateRegistrationProvidersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public CertificateRegistrationProvidersInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(CertificateRegistrationProvidersService.class); + this.client = client; + } + + /** + * The interface defining all the services for CertificateRegistrationProviders to be + * used by Retrofit to perform actually REST calls. + */ + interface CertificateRegistrationProvidersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.CertificateRegistrationProviders listOperations" }) + @GET("providers/Microsoft.CertificateRegistration/operations") + Observable> listOperations(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.CertificateRegistrationProviders listOperationsNext" }) + @GET + Observable> listOperationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmOperationDescriptionInner> object if successful. + */ + public PagedList listOperations() { + ServiceResponse> response = listOperationsSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listOperationsAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listOperationsSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable> listOperationsAsync() { + return listOperationsWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable>> listOperationsWithServiceResponseAsync() { + return listOperationsSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listOperationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CsmOperationDescriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listOperationsSinglePageAsync() { + final String apiVersion = "2015-08-01"; + return service.listOperations(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listOperationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listOperationsDelegate(Response response) throws CloudException, IOException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmOperationDescriptionInner> object if successful. + */ + public PagedList listOperationsNext(final String nextPageLink) { + ServiceResponse> response = listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listOperationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listOperationsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable> listOperationsNextAsync(final String nextPageLink) { + return listOperationsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable>> listOperationsNextWithServiceResponseAsync(final String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listOperationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CsmOperationDescriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listOperationsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listOperationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listOperationsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listOperationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificatesInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificatesInner.java new file mode 100644 index 00000000000..77854a6ee16 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CertificatesInner.java @@ -0,0 +1,930 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Certificates. + */ +public class CertificatesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private CertificatesService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * Initializes an instance of CertificatesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public CertificatesInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(CertificatesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Certificates to be + * used by Retrofit to perform actually REST calls. + */ + interface CertificatesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Certificates list" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.Certificates listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.Certificates getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") + Observable> getByResourceGroup(@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", "x-ms-logging-context: com.microsoft.azure.management.web.Certificates createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.Certificates delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{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", "x-ms-logging-context: com.microsoft.azure.management.web.Certificates update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CertificatePatchResourceInner certificateEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Certificates listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Certificates listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CertificateInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + 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. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all certificates in a resource group. + * Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CertificateInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all certificates in a resource group. + * Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all certificates in a resource group. + * Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all certificates in a resource group. + * Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all certificates in a resource group. + * Get all certificates in a resource group. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CertificateInner> 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-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 = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a certificate. + * Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CertificateInner object if successful. + */ + public CertificateInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get a certificate. + * Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get a certificate. + * Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1, CertificateInner>() { + @Override + public CertificateInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a certificate. + * Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(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.getByResourceGroup(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 = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a certificate. + * Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CertificateInner object if successful. + */ + public CertificateInner createOrUpdate(String resourceGroupName, String name, CertificateInner certificateEnvelope) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).toBlocking().single().body(); + } + + /** + * Create or update a certificate. + * Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope), serviceCallback); + } + + /** + * Create or update a certificate. + * Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + 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.body(); + } + }); + } + + /** + * Create or update a certificate. + * Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope) { + if (resourceGroupName == null) { + throw new 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 (certificateEnvelope == null) { + throw new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null."); + } + Validator.validate(certificateEnvelope); + 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 = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a certificate. + * Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String name) { + deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Delete a certificate. + * Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Delete a certificate. + * Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a certificate. + * Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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-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 = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a certificate. + * Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CertificateInner object if successful. + */ + public CertificateInner update(String resourceGroupName, String name, CertificatePatchResourceInner certificateEnvelope) { + return updateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).toBlocking().single().body(); + } + + /** + * Create or update a certificate. + * Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String name, CertificatePatchResourceInner certificateEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope), serviceCallback); + } + + /** + * Create or update a certificate. + * Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable updateAsync(String resourceGroupName, String name, CertificatePatchResourceInner certificateEnvelope) { + return updateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).map(new Func1, CertificateInner>() { + @Override + public CertificateInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a certificate. + * Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, CertificatePatchResourceInner certificateEnvelope) { + if (resourceGroupName == null) { + throw new 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 (certificateEnvelope == null) { + throw new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null."); + } + Validator.validate(certificateEnvelope); + 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 = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CertificateInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all certificates in a resource group. + * Get all certificates in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CertificateInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all certificates in a resource group. + * Get all certificates in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all certificates in a resource group. + * Get all certificates in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all certificates in a resource group. + * Get all certificates in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all certificates in a resource group. + * Get all certificates in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CertificateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ConnectionStringDictionaryInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ConnectionStringDictionaryInner.java new file mode 100644 index 00000000000..1c990c59f31 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ConnectionStringDictionaryInner.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import java.util.Map; +import com.microsoft.azure.management.web.ConnStringValueTypePair; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * String dictionary resource. + */ +public class ConnectionStringDictionaryInner extends ProxyOnlyResource { + /** + * Connection strings. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the properties value. + * + * @return the properties value + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties value. + * + * @param properties the properties value to set + * @return the ConnectionStringDictionaryInner object itself. + */ + public ConnectionStringDictionaryInner withProperties(Map properties) { + this.properties = properties; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ContinuousWebJobInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ContinuousWebJobInner.java new file mode 100644 index 00000000000..df861f28bb2 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ContinuousWebJobInner.java @@ -0,0 +1,299 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.ContinuousWebJobStatus; +import com.microsoft.azure.management.web.WebJobType; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Continuous Web Job Information. + */ +@JsonFlatten +public class ContinuousWebJobInner extends ProxyOnlyResource { + /** + * Job status. Possible values include: 'Initializing', 'Starting', + * 'Running', 'PendingRestart', 'Stopped'. + */ + @JsonProperty(value = "properties.status") + private ContinuousWebJobStatus status; + + /** + * Detailed status. + */ + @JsonProperty(value = "properties.detailedStatus") + private String detailedStatus; + + /** + * Log URL. + */ + @JsonProperty(value = "properties.logUrl") + private String logUrl; + + /** + * Job name. Used as job identifier in ARM resource URI. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private String continuousWebJobName; + + /** + * Run command. + */ + @JsonProperty(value = "properties.runCommand") + private String runCommand; + + /** + * Job URL. + */ + @JsonProperty(value = "properties.url") + private String url; + + /** + * Extra Info URL. + */ + @JsonProperty(value = "properties.extraInfoUrl") + private String extraInfoUrl; + + /** + * Job type. Possible values include: 'Continuous', 'Triggered'. + */ + @JsonProperty(value = "properties.jobType") + private WebJobType jobType; + + /** + * Error information. + */ + @JsonProperty(value = "properties.error") + private String error; + + /** + * Using SDK?. + */ + @JsonProperty(value = "properties.usingSdk") + private Boolean usingSdk; + + /** + * Job settings. + */ + @JsonProperty(value = "properties.settings") + private Map settings; + + /** + * Get the status value. + * + * @return the status value + */ + public ContinuousWebJobStatus status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withStatus(ContinuousWebJobStatus status) { + this.status = status; + return this; + } + + /** + * Get the detailedStatus value. + * + * @return the detailedStatus value + */ + public String detailedStatus() { + return this.detailedStatus; + } + + /** + * Set the detailedStatus value. + * + * @param detailedStatus the detailedStatus value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withDetailedStatus(String detailedStatus) { + this.detailedStatus = detailedStatus; + return this; + } + + /** + * Get the logUrl value. + * + * @return the logUrl value + */ + public String logUrl() { + return this.logUrl; + } + + /** + * Set the logUrl value. + * + * @param logUrl the logUrl value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withLogUrl(String logUrl) { + this.logUrl = logUrl; + return this; + } + + /** + * Get the continuousWebJobName value. + * + * @return the continuousWebJobName value + */ + public String continuousWebJobName() { + return this.continuousWebJobName; + } + + /** + * Get the runCommand value. + * + * @return the runCommand value + */ + public String runCommand() { + return this.runCommand; + } + + /** + * Set the runCommand value. + * + * @param runCommand the runCommand value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withRunCommand(String runCommand) { + this.runCommand = runCommand; + return this; + } + + /** + * Get the url value. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set the url value. + * + * @param url the url value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the extraInfoUrl value. + * + * @return the extraInfoUrl value + */ + public String extraInfoUrl() { + return this.extraInfoUrl; + } + + /** + * Set the extraInfoUrl value. + * + * @param extraInfoUrl the extraInfoUrl value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withExtraInfoUrl(String extraInfoUrl) { + this.extraInfoUrl = extraInfoUrl; + return this; + } + + /** + * Get the jobType value. + * + * @return the jobType value + */ + public WebJobType jobType() { + return this.jobType; + } + + /** + * Set the jobType value. + * + * @param jobType the jobType value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withJobType(WebJobType jobType) { + this.jobType = jobType; + return this; + } + + /** + * Get the error value. + * + * @return the error value + */ + public String error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withError(String error) { + this.error = error; + return this; + } + + /** + * Get the usingSdk value. + * + * @return the usingSdk value + */ + public Boolean usingSdk() { + return this.usingSdk; + } + + /** + * Set the usingSdk value. + * + * @param usingSdk the usingSdk value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withUsingSdk(Boolean usingSdk) { + this.usingSdk = usingSdk; + return this; + } + + /** + * Get the settings value. + * + * @return the settings value + */ + public Map settings() { + return this.settings; + } + + /** + * Set the settings value. + * + * @param settings the settings value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withSettings(Map settings) { + this.settings = settings; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmMoveResourceEnvelopeInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmMoveResourceEnvelopeInner.java new file mode 100644 index 00000000000..1a406befe9f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmMoveResourceEnvelopeInner.java @@ -0,0 +1,71 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Object with a list of the resources that need to be moved and the resource + * group they should be moved to. + */ +public class CsmMoveResourceEnvelopeInner { + /** + * The targetResourceGroup property. + */ + @JsonProperty(value = "targetResourceGroup") + private String targetResourceGroup; + + /** + * The resources property. + */ + @JsonProperty(value = "resources") + private List resources; + + /** + * Get the targetResourceGroup value. + * + * @return the targetResourceGroup value + */ + public String targetResourceGroup() { + return this.targetResourceGroup; + } + + /** + * Set the targetResourceGroup value. + * + * @param targetResourceGroup the targetResourceGroup value to set + * @return the CsmMoveResourceEnvelopeInner object itself. + */ + public CsmMoveResourceEnvelopeInner withTargetResourceGroup(String targetResourceGroup) { + this.targetResourceGroup = targetResourceGroup; + return this; + } + + /** + * Get the resources value. + * + * @return the resources value + */ + public List resources() { + return this.resources; + } + + /** + * Set the resources value. + * + * @param resources the resources value to set + * @return the CsmMoveResourceEnvelopeInner object itself. + */ + public CsmMoveResourceEnvelopeInner withResources(List resources) { + this.resources = resources; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmOperationDescriptionInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmOperationDescriptionInner.java new file mode 100644 index 00000000000..a911227f467 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmOperationDescriptionInner.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.microsoft.azure.management.web.CsmOperationDisplay; +import com.microsoft.azure.management.web.CsmOperationDescriptionProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of an operation available for Microsoft.Web resource provider. + */ +public class CsmOperationDescriptionInner { + /** + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The display property. + */ + @JsonProperty(value = "display") + private CsmOperationDisplay display; + + /** + * The origin property. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * The properties property. + */ + @JsonProperty(value = "properties") + private CsmOperationDescriptionProperties 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 CsmOperationDescriptionInner object itself. + */ + public CsmOperationDescriptionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display value. + * + * @return the display value + */ + public CsmOperationDisplay display() { + return this.display; + } + + /** + * Set the display value. + * + * @param display the display value to set + * @return the CsmOperationDescriptionInner object itself. + */ + public CsmOperationDescriptionInner withDisplay(CsmOperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin value. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set the origin value. + * + * @param origin the origin value to set + * @return the CsmOperationDescriptionInner object itself. + */ + public CsmOperationDescriptionInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get the properties value. + * + * @return the properties value + */ + public CsmOperationDescriptionProperties properties() { + return this.properties; + } + + /** + * Set the properties value. + * + * @param properties the properties value to set + * @return the CsmOperationDescriptionInner object itself. + */ + public CsmOperationDescriptionInner withProperties(CsmOperationDescriptionProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmSlotEntityInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmSlotEntityInner.java new file mode 100644 index 00000000000..12ded4d4775 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmSlotEntityInner.java @@ -0,0 +1,70 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Deployment slot parameters. + */ +public class CsmSlotEntityInner { + /** + * Destination deployment slot during swap operation. + */ + @JsonProperty(value = "targetSlot", required = true) + private String targetSlot; + + /** + * <code>true</code> to preserve Virtual Network to the slot + * during swap; otherwise, <code>false</code>. + */ + @JsonProperty(value = "preserveVnet", required = true) + private boolean preserveVnet; + + /** + * Get the targetSlot value. + * + * @return the targetSlot value + */ + public String targetSlot() { + return this.targetSlot; + } + + /** + * Set the targetSlot value. + * + * @param targetSlot the targetSlot value to set + * @return the CsmSlotEntityInner object itself. + */ + public CsmSlotEntityInner withTargetSlot(String targetSlot) { + this.targetSlot = targetSlot; + return this; + } + + /** + * Get the preserveVnet value. + * + * @return the preserveVnet value + */ + public boolean preserveVnet() { + return this.preserveVnet; + } + + /** + * Set the preserveVnet value. + * + * @param preserveVnet the preserveVnet value to set + * @return the CsmSlotEntityInner object itself. + */ + public CsmSlotEntityInner withPreserveVnet(boolean preserveVnet) { + this.preserveVnet = preserveVnet; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmUsageQuotaInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmUsageQuotaInner.java new file mode 100644 index 00000000000..3916e06bc06 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CsmUsageQuotaInner.java @@ -0,0 +1,149 @@ +/** + * 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.web.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.LocalizableString; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Usage of the quota resource. + */ +public class CsmUsageQuotaInner { + /** + * Units of measurement for the quota resourse. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Next reset time for the resource counter. + */ + @JsonProperty(value = "nextResetTime") + private DateTime nextResetTime; + + /** + * The current value of the resource counter. + */ + @JsonProperty(value = "currentValue") + private Long currentValue; + + /** + * The resource limit. + */ + @JsonProperty(value = "limit") + private Long limit; + + /** + * Quota name. + */ + @JsonProperty(value = "name") + private LocalizableString name; + + /** + * Get the unit value. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit value. + * + * @param unit the unit value to set + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the nextResetTime value. + * + * @return the nextResetTime value + */ + public DateTime nextResetTime() { + return this.nextResetTime; + } + + /** + * Set the nextResetTime value. + * + * @param nextResetTime the nextResetTime value to set + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withNextResetTime(DateTime nextResetTime) { + this.nextResetTime = nextResetTime; + return this; + } + + /** + * Get the currentValue value. + * + * @return the currentValue value + */ + public Long currentValue() { + return this.currentValue; + } + + /** + * Set the currentValue value. + * + * @param currentValue the currentValue value to set + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withCurrentValue(Long currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the limit value. + * + * @return the limit value + */ + public Long limit() { + return this.limit; + } + + /** + * Set the limit value. + * + * @param limit the limit value to set + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Get the name value. + * + * @return the name value + */ + public LocalizableString name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withName(LocalizableString name) { + this.name = name; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CustomHostnameAnalysisResultInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CustomHostnameAnalysisResultInner.java new file mode 100644 index 00000000000..e6459015370 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/CustomHostnameAnalysisResultInner.java @@ -0,0 +1,248 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.DnsVerificationTestResult; +import com.microsoft.azure.management.web.ErrorEntity; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Custom domain analysis. + */ +@JsonFlatten +public class CustomHostnameAnalysisResultInner extends ProxyOnlyResource { + /** + * <code>true</code> if hostname is already verified; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.isHostnameAlreadyVerified", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isHostnameAlreadyVerified; + + /** + * DNS verification test result. Possible values include: 'Passed', + * 'Failed', 'Skipped'. + */ + @JsonProperty(value = "properties.customDomainVerificationTest", access = JsonProperty.Access.WRITE_ONLY) + private DnsVerificationTestResult customDomainVerificationTest; + + /** + * Raw failure information if DNS verification fails. + */ + @JsonProperty(value = "properties.customDomainVerificationFailureInfo", access = JsonProperty.Access.WRITE_ONLY) + private ErrorEntity customDomainVerificationFailureInfo; + + /** + * <code>true</code> if there is a conflict on a scale unit; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.hasConflictOnScaleUnit", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasConflictOnScaleUnit; + + /** + * <code>true</code> if htere is a conflict across + * subscriptions; otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.hasConflictAcrossSubscription", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasConflictAcrossSubscription; + + /** + * Name of the conflicting app on scale unit if it's within the same + * subscription. + */ + @JsonProperty(value = "properties.conflictingAppResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String conflictingAppResourceId; + + /** + * CName records controller can see for this hostname. + */ + @JsonProperty(value = "properties.cNameRecords") + private List cNameRecords; + + /** + * TXT records controller can see for this hostname. + */ + @JsonProperty(value = "properties.txtRecords") + private List txtRecords; + + /** + * A records controller can see for this hostname. + */ + @JsonProperty(value = "properties.aRecords") + private List aRecords; + + /** + * Alternate CName records controller can see for this hostname. + */ + @JsonProperty(value = "properties.alternateCNameRecords") + private List alternateCNameRecords; + + /** + * Alternate TXT records controller can 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; + } + + /** + * Get the customDomainVerificationTest value. + * + * @return the customDomainVerificationTest value + */ + public DnsVerificationTestResult customDomainVerificationTest() { + return this.customDomainVerificationTest; + } + + /** + * Get the customDomainVerificationFailureInfo value. + * + * @return the customDomainVerificationFailureInfo value + */ + public ErrorEntity customDomainVerificationFailureInfo() { + return this.customDomainVerificationFailureInfo; + } + + /** + * Get the hasConflictOnScaleUnit value. + * + * @return the hasConflictOnScaleUnit value + */ + public Boolean hasConflictOnScaleUnit() { + return this.hasConflictOnScaleUnit; + } + + /** + * Get the hasConflictAcrossSubscription value. + * + * @return the hasConflictAcrossSubscription value + */ + public Boolean hasConflictAcrossSubscription() { + return this.hasConflictAcrossSubscription; + } + + /** + * Get the conflictingAppResourceId value. + * + * @return the conflictingAppResourceId value + */ + public String conflictingAppResourceId() { + return this.conflictingAppResourceId; + } + + /** + * 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-web/src/main/java/com/microsoft/azure/management/web/implementation/DeletedSiteInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DeletedSiteInner.java new file mode 100644 index 00000000000..b42ab6398b2 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DeletedSiteInner.java @@ -0,0 +1,118 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A deleted app. + */ +public class DeletedSiteInner { + /** + * Numeric id for the deleted site. + */ + @JsonProperty(value = "id") + private Integer id; + + /** + * Time in UTC when the app was deleted. + */ + @JsonProperty(value = "deletedTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String deletedTimestamp; + + /** + * Subscription containing the deleted site. + */ + @JsonProperty(value = "subscription", access = JsonProperty.Access.WRITE_ONLY) + private String subscription; + + /** + * ResourceGroup that contained the deleted site. + */ + @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /** + * Name of the deleted site. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Slot of the deleted site. + */ + @JsonProperty(value = "slot", access = JsonProperty.Access.WRITE_ONLY) + private String slot; + + /** + * Get the id value. + * + * @return the id value + */ + public Integer id() { + return this.id; + } + + /** + * Set the id value. + * + * @param id the id value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withId(Integer id) { + this.id = id; + return this; + } + + /** + * Get the deletedTimestamp value. + * + * @return the deletedTimestamp value + */ + public String deletedTimestamp() { + return this.deletedTimestamp; + } + + /** + * Get the subscription value. + * + * @return the subscription value + */ + public String subscription() { + return this.subscription; + } + + /** + * Get the resourceGroup value. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the slot value. + * + * @return the slot value + */ + public String slot() { + return this.slot; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DeletedWebAppsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DeletedWebAppsInner.java new file mode 100644 index 00000000000..7f08461950b --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DeletedWebAppsInner.java @@ -0,0 +1,295 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DeletedWebApps. + */ +public class DeletedWebAppsInner { + /** The Retrofit service to perform REST calls. */ + private DeletedWebAppsService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * Initializes an instance of DeletedWebAppsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DeletedWebAppsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(DeletedWebAppsService.class); + this.client = client; + } + + /** + * The interface defining all the services for DeletedWebApps to be + * used by Retrofit to perform actually REST calls. + */ + interface DeletedWebAppsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.DeletedWebApps list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.DeletedWebApps listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all deleted apps for a subscription. + * Get all deleted apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DeletedSiteInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all deleted apps for a subscription. + * Get all deleted apps for a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all deleted apps for a subscription. + * Get all deleted apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all deleted apps for a subscription. + * Get all deleted apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all deleted apps for a subscription. + * Get all deleted apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeletedSiteInner> 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all deleted apps for a subscription. + * Get all deleted apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DeletedSiteInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all deleted apps for a subscription. + * Get all deleted apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all deleted apps for a subscription. + * Get all deleted apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all deleted apps for a subscription. + * Get all deleted apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all deleted apps for a subscription. + * Get all deleted apps for a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeletedSiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DeploymentInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DeploymentInner.java new file mode 100644 index 00000000000..11060881907 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DeploymentInner.java @@ -0,0 +1,282 @@ +/** + * 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.web.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * User crendentials used for publishing activity. + */ +@JsonFlatten +public class DeploymentInner extends ProxyOnlyResource { + /** + * Identifier for deployment. + */ + @JsonProperty(value = "properties.id") + private String deploymentId; + + /** + * Deployment status. + */ + @JsonProperty(value = "properties.status") + private Integer status; + + /** + * Details about deployment status. + */ + @JsonProperty(value = "properties.message") + private String message; + + /** + * Who authored the deployment. + */ + @JsonProperty(value = "properties.author") + private String author; + + /** + * Who performed the deployment. + */ + @JsonProperty(value = "properties.deployer") + private String deployer; + + /** + * Author email. + */ + @JsonProperty(value = "properties.authorEmail") + private String authorEmail; + + /** + * Start time. + */ + @JsonProperty(value = "properties.startTime") + private DateTime startTime; + + /** + * End time. + */ + @JsonProperty(value = "properties.endTime") + private DateTime endTime; + + /** + * True if deployment is currently active, false if completed and null if + * not started. + */ + @JsonProperty(value = "properties.active") + private Boolean active; + + /** + * Details on deployment. + */ + @JsonProperty(value = "properties.details") + private String details; + + /** + * Get the deploymentId value. + * + * @return the deploymentId value + */ + public String deploymentId() { + return this.deploymentId; + } + + /** + * Set the deploymentId value. + * + * @param deploymentId the deploymentId value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withDeploymentId(String deploymentId) { + this.deploymentId = deploymentId; + return this; + } + + /** + * Get the status value. + * + * @return the status value + */ + public Integer status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withStatus(Integer status) { + this.status = status; + 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 DeploymentInner object itself. + */ + public DeploymentInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the author value. + * + * @return the author value + */ + public String author() { + return this.author; + } + + /** + * Set the author value. + * + * @param author the author value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withAuthor(String author) { + this.author = author; + return this; + } + + /** + * Get the deployer value. + * + * @return the deployer value + */ + public String deployer() { + return this.deployer; + } + + /** + * Set the deployer value. + * + * @param deployer the deployer value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withDeployer(String deployer) { + this.deployer = deployer; + return this; + } + + /** + * Get the authorEmail value. + * + * @return the authorEmail value + */ + public String authorEmail() { + return this.authorEmail; + } + + /** + * Set the authorEmail value. + * + * @param authorEmail the authorEmail value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withAuthorEmail(String authorEmail) { + this.authorEmail = authorEmail; + 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 DeploymentInner object itself. + */ + public DeploymentInner 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 DeploymentInner object itself. + */ + public DeploymentInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the active value. + * + * @return the active value + */ + public Boolean active() { + return this.active; + } + + /** + * Set the active value. + * + * @param active the active value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withActive(Boolean active) { + this.active = active; + return this; + } + + /** + * Get the details value. + * + * @return the details value + */ + public String details() { + return this.details; + } + + /** + * Set the details value. + * + * @param details the details value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withDetails(String details) { + this.details = details; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DeploymentLocationsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DeploymentLocationsInner.java new file mode 100644 index 00000000000..ffe37a80648 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DeploymentLocationsInner.java @@ -0,0 +1,100 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.microsoft.azure.management.web.AppServiceEnvironment; +import com.microsoft.azure.management.web.HostingEnvironmentDeploymentInfo; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of available locations (regions or App Service Environments) for + * deployment of App Service resources. + */ +public class DeploymentLocationsInner { + /** + * Available regions. + */ + @JsonProperty(value = "locations") + private List locations; + + /** + * Available App Service Environments with full descriptions of the + * environments. + */ + @JsonProperty(value = "hostingEnvironments") + private List hostingEnvironments; + + /** + * Available App Service Environments with basic information. + */ + @JsonProperty(value = "hostingEnvironmentDeploymentInfos") + private List hostingEnvironmentDeploymentInfos; + + /** + * 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 DeploymentLocationsInner object itself. + */ + public DeploymentLocationsInner withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the hostingEnvironments value. + * + * @return the hostingEnvironments value + */ + public List hostingEnvironments() { + return this.hostingEnvironments; + } + + /** + * Set the hostingEnvironments value. + * + * @param hostingEnvironments the hostingEnvironments value to set + * @return the DeploymentLocationsInner object itself. + */ + public DeploymentLocationsInner withHostingEnvironments(List hostingEnvironments) { + this.hostingEnvironments = hostingEnvironments; + return this; + } + + /** + * Get the hostingEnvironmentDeploymentInfos value. + * + * @return the hostingEnvironmentDeploymentInfos value + */ + public List hostingEnvironmentDeploymentInfos() { + return this.hostingEnvironmentDeploymentInfos; + } + + /** + * Set the hostingEnvironmentDeploymentInfos value. + * + * @param hostingEnvironmentDeploymentInfos the hostingEnvironmentDeploymentInfos value to set + * @return the DeploymentLocationsInner object itself. + */ + public DeploymentLocationsInner withHostingEnvironmentDeploymentInfos(List hostingEnvironmentDeploymentInfos) { + this.hostingEnvironmentDeploymentInfos = hostingEnvironmentDeploymentInfos; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DetectorDefinitionInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DetectorDefinitionInner.java new file mode 100644 index 00000000000..7767c1b0cba --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DetectorDefinitionInner.java @@ -0,0 +1,80 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Class representing detector definition. + */ +@JsonFlatten +public class DetectorDefinitionInner extends ProxyOnlyResource { + /** + * Display name of the detector. + */ + @JsonProperty(value = "properties.displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /** + * Description of the detector. + */ + @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Detector Rank. + */ + @JsonProperty(value = "properties.rank", access = JsonProperty.Access.WRITE_ONLY) + private Double rank; + + /** + * Flag representing whether detector is enabled or not. + */ + @JsonProperty(value = "properties.isEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEnabled; + + /** + * Get the displayName value. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get the rank value. + * + * @return the rank value + */ + public Double rank() { + return this.rank; + } + + /** + * Get the isEnabled value. + * + * @return the isEnabled value + */ + public Boolean isEnabled() { + return this.isEnabled; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticAnalysisInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticAnalysisInner.java new file mode 100644 index 00000000000..ea1a97c7889 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticAnalysisInner.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.web.AbnormalTimePeriod; +import com.microsoft.azure.management.web.AnalysisData; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Class representing a diagnostic analysis done on an application. + */ +@JsonFlatten +public class DiagnosticAnalysisInner extends ProxyOnlyResource { + /** + * Start time of the period. + */ + @JsonProperty(value = "properties.startTime") + private DateTime startTime; + + /** + * End time of the period. + */ + @JsonProperty(value = "properties.endTime") + private DateTime endTime; + + /** + * List of time periods. + */ + @JsonProperty(value = "properties.abnormalTimePeriods") + private List abnormalTimePeriods; + + /** + * Data by each detector. + */ + @JsonProperty(value = "properties.payload") + private List payload; + + /** + * Data by each detector for detectors that did not corelate. + */ + @JsonProperty(value = "properties.nonCorrelatedDetectors") + private List nonCorrelatedDetectors; + + /** + * 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 DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner 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 DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the abnormalTimePeriods value. + * + * @return the abnormalTimePeriods value + */ + public List abnormalTimePeriods() { + return this.abnormalTimePeriods; + } + + /** + * Set the abnormalTimePeriods value. + * + * @param abnormalTimePeriods the abnormalTimePeriods value to set + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withAbnormalTimePeriods(List abnormalTimePeriods) { + this.abnormalTimePeriods = abnormalTimePeriods; + return this; + } + + /** + * Get the payload value. + * + * @return the payload value + */ + public List payload() { + return this.payload; + } + + /** + * Set the payload value. + * + * @param payload the payload value to set + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withPayload(List payload) { + this.payload = payload; + return this; + } + + /** + * Get the nonCorrelatedDetectors value. + * + * @return the nonCorrelatedDetectors value + */ + public List nonCorrelatedDetectors() { + return this.nonCorrelatedDetectors; + } + + /** + * Set the nonCorrelatedDetectors value. + * + * @param nonCorrelatedDetectors the nonCorrelatedDetectors value to set + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withNonCorrelatedDetectors(List nonCorrelatedDetectors) { + this.nonCorrelatedDetectors = nonCorrelatedDetectors; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticCategoryInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticCategoryInner.java new file mode 100644 index 00000000000..6885146d60b --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticCategoryInner.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Class representing detector definition. + */ +@JsonFlatten +public class DiagnosticCategoryInner extends ProxyOnlyResource { + /** + * Description of the diagnostic category. + */ + @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticDetectorResponseInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticDetectorResponseInner.java new file mode 100644 index 00000000000..5102cfd5da5 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticDetectorResponseInner.java @@ -0,0 +1,234 @@ +/** + * 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.web.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.web.DiagnosticMetricSet; +import com.microsoft.azure.management.web.DetectorAbnormalTimePeriod; +import com.microsoft.azure.management.web.NameValuePair; +import com.microsoft.azure.management.web.ResponseMetaData; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Class representing Reponse from Diagnostic Detectors. + */ +@JsonFlatten +public class DiagnosticDetectorResponseInner extends ProxyOnlyResource { + /** + * Start time of the period. + */ + @JsonProperty(value = "properties.startTime") + private DateTime startTime; + + /** + * End time of the period. + */ + @JsonProperty(value = "properties.endTime") + private DateTime endTime; + + /** + * Flag representing Issue was detected. + */ + @JsonProperty(value = "properties.issueDetected") + private Boolean issueDetected; + + /** + * Detector's definition. + */ + @JsonProperty(value = "properties.detectorDefinition") + private DetectorDefinitionInner detectorDefinition; + + /** + * Metrics provided by the detector. + */ + @JsonProperty(value = "properties.metrics") + private List metrics; + + /** + * List of Correlated events found by the detector. + */ + @JsonProperty(value = "properties.abnormalTimePeriods") + private List abnormalTimePeriods; + + /** + * Additional Data that detector wants to send. + */ + @JsonProperty(value = "properties.data") + private List> data; + + /** + * Meta Data. + */ + @JsonProperty(value = "properties.responseMetaData") + private ResponseMetaData responseMetaData; + + /** + * 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 DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner 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 DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the issueDetected value. + * + * @return the issueDetected value + */ + public Boolean issueDetected() { + return this.issueDetected; + } + + /** + * Set the issueDetected value. + * + * @param issueDetected the issueDetected value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withIssueDetected(Boolean issueDetected) { + this.issueDetected = issueDetected; + return this; + } + + /** + * Get the detectorDefinition value. + * + * @return the detectorDefinition value + */ + public DetectorDefinitionInner detectorDefinition() { + return this.detectorDefinition; + } + + /** + * Set the detectorDefinition value. + * + * @param detectorDefinition the detectorDefinition value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withDetectorDefinition(DetectorDefinitionInner detectorDefinition) { + this.detectorDefinition = detectorDefinition; + return this; + } + + /** + * Get the metrics value. + * + * @return the metrics value + */ + public List metrics() { + return this.metrics; + } + + /** + * Set the metrics value. + * + * @param metrics the metrics value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withMetrics(List metrics) { + this.metrics = metrics; + return this; + } + + /** + * Get the abnormalTimePeriods value. + * + * @return the abnormalTimePeriods value + */ + public List abnormalTimePeriods() { + return this.abnormalTimePeriods; + } + + /** + * Set the abnormalTimePeriods value. + * + * @param abnormalTimePeriods the abnormalTimePeriods value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withAbnormalTimePeriods(List abnormalTimePeriods) { + this.abnormalTimePeriods = abnormalTimePeriods; + return this; + } + + /** + * Get the data value. + * + * @return the data value + */ + public List> data() { + return this.data; + } + + /** + * Set the data value. + * + * @param data the data value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withData(List> data) { + this.data = data; + return this; + } + + /** + * Get the responseMetaData value. + * + * @return the responseMetaData value + */ + public ResponseMetaData responseMetaData() { + return this.responseMetaData; + } + + /** + * Set the responseMetaData value. + * + * @param responseMetaData the responseMetaData value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withResponseMetaData(ResponseMetaData responseMetaData) { + this.responseMetaData = responseMetaData; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticsInner.java new file mode 100644 index 00000000000..e17cf4e8821 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DiagnosticsInner.java @@ -0,0 +1,3476 @@ +/** + * 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.web.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import org.joda.time.DateTime; +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.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Diagnostics. + */ +public class DiagnosticsInner { + /** The Retrofit service to perform REST calls. */ + private DiagnosticsService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * Initializes an instance of DiagnosticsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DiagnosticsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(DiagnosticsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Diagnostics to be + * used by Retrofit to perform actually REST calls. + */ + interface DiagnosticsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteDiagnosticCategories" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics") + Observable> listSiteDiagnosticCategories(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics getSiteDiagnosticCategory" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}") + Observable> getSiteDiagnosticCategory(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteAnalyses" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses") + Observable> listSiteAnalyses(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics getSiteAnalysis" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") + Observable> getSiteAnalysis(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @Path("analysisName") String analysisName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics executeSiteAnalysis" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") + Observable> executeSiteAnalysis(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @Path("analysisName") String analysisName, @Path("subscriptionId") String subscriptionId, @Query("startTime") DateTime startTime, @Query("endTime") DateTime endTime, @Query("timeGrain") String timeGrain, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteDetectors" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors") + Observable> listSiteDetectors(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics getSiteDetector" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") + Observable> getSiteDetector(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @Path("detectorName") String detectorName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics executeSiteDetector" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") + Observable> executeSiteDetector(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("detectorName") String detectorName, @Path("diagnosticCategory") String diagnosticCategory, @Path("subscriptionId") String subscriptionId, @Query("startTime") DateTime startTime, @Query("endTime") DateTime endTime, @Query("timeGrain") String timeGrain, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteDiagnosticCategoriesSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics") + Observable> listSiteDiagnosticCategoriesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics getSiteDiagnosticCategorySlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}") + Observable> getSiteDiagnosticCategorySlot(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @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", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteAnalysesSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses") + Observable> listSiteAnalysesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @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", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics getSiteAnalysisSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") + Observable> getSiteAnalysisSlot(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @Path("analysisName") String analysisName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics executeSiteAnalysisSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") + Observable> executeSiteAnalysisSlot(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @Path("analysisName") String analysisName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("startTime") DateTime startTime, @Query("endTime") DateTime endTime, @Query("timeGrain") String timeGrain, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteDetectorsSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors") + Observable> listSiteDetectorsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @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", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics getSiteDetectorSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") + Observable> getSiteDetectorSlot(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("diagnosticCategory") String diagnosticCategory, @Path("detectorName") String detectorName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics executeSiteDetectorSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") + Observable> executeSiteDetectorSlot(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("detectorName") String detectorName, @Path("diagnosticCategory") String diagnosticCategory, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("startTime") DateTime startTime, @Query("endTime") DateTime endTime, @Query("timeGrain") String timeGrain, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteDiagnosticCategoriesNext" }) + @GET + Observable> listSiteDiagnosticCategoriesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteAnalysesNext" }) + @GET + Observable> listSiteAnalysesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteDetectorsNext" }) + @GET + Observable> listSiteDetectorsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics getSiteDetectorNext" }) + @GET + Observable> getSiteDetectorNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteDiagnosticCategoriesSlotNext" }) + @GET + Observable> listSiteDiagnosticCategoriesSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteAnalysesSlotNext" }) + @GET + Observable> listSiteAnalysesSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics listSiteDetectorsSlotNext" }) + @GET + Observable> listSiteDetectorsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Diagnostics getSiteDetectorSlotNext" }) + @GET + Observable> getSiteDetectorSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DiagnosticCategoryInner> object if successful. + */ + public PagedList listSiteDiagnosticCategories(final String resourceGroupName, final String siteName) { + ServiceResponse> response = listSiteDiagnosticCategoriesSinglePageAsync(resourceGroupName, siteName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDiagnosticCategoriesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteDiagnosticCategoriesAsync(final String resourceGroupName, final String siteName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDiagnosticCategoriesSinglePageAsync(resourceGroupName, siteName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDiagnosticCategoriesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DiagnosticCategoryInner> object + */ + public Observable> listSiteDiagnosticCategoriesAsync(final String resourceGroupName, final String siteName) { + return listSiteDiagnosticCategoriesWithServiceResponseAsync(resourceGroupName, siteName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DiagnosticCategoryInner> object + */ + public Observable>> listSiteDiagnosticCategoriesWithServiceResponseAsync(final String resourceGroupName, final String siteName) { + return listSiteDiagnosticCategoriesSinglePageAsync(resourceGroupName, siteName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteDiagnosticCategoriesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param siteName Site Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DiagnosticCategoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDiagnosticCategoriesSinglePageAsync(final String resourceGroupName, final 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 (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.listSiteDiagnosticCategories(resourceGroupName, siteName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDiagnosticCategoriesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDiagnosticCategoriesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Diagnostics Category. + * Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticCategoryInner object if successful. + */ + public DiagnosticCategoryInner getSiteDiagnosticCategory(String resourceGroupName, String siteName, String diagnosticCategory) { + return getSiteDiagnosticCategoryWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory).toBlocking().single().body(); + } + + /** + * Get Diagnostics Category. + * Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSiteDiagnosticCategoryAsync(String resourceGroupName, String siteName, String diagnosticCategory, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteDiagnosticCategoryWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory), serviceCallback); + } + + /** + * Get Diagnostics Category. + * Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticCategoryInner object + */ + public Observable getSiteDiagnosticCategoryAsync(String resourceGroupName, String siteName, String diagnosticCategory) { + return getSiteDiagnosticCategoryWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory).map(new Func1, DiagnosticCategoryInner>() { + @Override + public DiagnosticCategoryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Diagnostics Category. + * Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticCategoryInner object + */ + public Observable> getSiteDiagnosticCategoryWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory 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.getSiteDiagnosticCategory(resourceGroupName, siteName, diagnosticCategory, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteDiagnosticCategoryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteDiagnosticCategoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AnalysisDefinitionInner> object if successful. + */ + public PagedList listSiteAnalyses(final String resourceGroupName, final String siteName, final String diagnosticCategory) { + ServiceResponse> response = listSiteAnalysesSinglePageAsync(resourceGroupName, siteName, diagnosticCategory).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteAnalysesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteAnalysesAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteAnalysesSinglePageAsync(resourceGroupName, siteName, diagnosticCategory), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteAnalysesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AnalysisDefinitionInner> object + */ + public Observable> listSiteAnalysesAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory) { + return listSiteAnalysesWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AnalysisDefinitionInner> object + */ + public Observable>> listSiteAnalysesWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory) { + return listSiteAnalysesSinglePageAsync(resourceGroupName, siteName, diagnosticCategory) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteAnalysesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param siteName Site Name + ServiceResponse> * @param diagnosticCategory Diagnostic Category + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AnalysisDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteAnalysesSinglePageAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory 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.listSiteAnalyses(resourceGroupName, siteName, diagnosticCategory, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteAnalysesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteAnalysesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Site Analysis. + * Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param analysisName Analysis Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticAnalysisInner object if successful. + */ + public DiagnosticAnalysisInner getSiteAnalysis(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + return getSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName).toBlocking().single().body(); + } + + /** + * Get Site Analysis. + * Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param analysisName Analysis Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName), serviceCallback); + } + + /** + * Get Site Analysis. + * Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param analysisName Analysis Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable getSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + return getSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName).map(new Func1, DiagnosticAnalysisInner>() { + @Override + public DiagnosticAnalysisInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Site Analysis. + * Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param analysisName Analysis Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable> getSiteAnalysisWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null."); + } + if (analysisName == null) { + throw new IllegalArgumentException("Parameter analysisName 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.getSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analysisName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteAnalysisDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteAnalysisDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticAnalysisInner object if successful. + */ + public DiagnosticAnalysisInner executeSiteAnalysis(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + return executeSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName).toBlocking().single().body(); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture executeSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(executeSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName), serviceCallback); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable executeSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + return executeSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName).map(new Func1, DiagnosticAnalysisInner>() { + @Override + public DiagnosticAnalysisInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable> executeSiteAnalysisWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null."); + } + if (analysisName == null) { + throw new IllegalArgumentException("Parameter analysisName 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"; + final DateTime startTime = null; + final DateTime endTime = null; + final String timeGrain = null; + return service.executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analysisName, this.client.subscriptionId(), startTime, endTime, timeGrain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = executeSiteAnalysisDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticAnalysisInner object if successful. + */ + public DiagnosticAnalysisInner executeSiteAnalysis(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, DateTime startTime, DateTime endTime, String timeGrain) { + return executeSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, startTime, endTime, timeGrain).toBlocking().single().body(); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture executeSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, DateTime startTime, DateTime endTime, String timeGrain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(executeSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, startTime, endTime, timeGrain), serviceCallback); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable executeSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, DateTime startTime, DateTime endTime, String timeGrain) { + return executeSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, startTime, endTime, timeGrain).map(new Func1, DiagnosticAnalysisInner>() { + @Override + public DiagnosticAnalysisInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable> executeSiteAnalysisWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, DateTime startTime, DateTime endTime, String timeGrain) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null."); + } + if (analysisName == null) { + throw new IllegalArgumentException("Parameter analysisName 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.executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analysisName, this.client.subscriptionId(), startTime, endTime, timeGrain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = executeSiteAnalysisDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse executeSiteAnalysisDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorDefinitionInner> object if successful. + */ + public PagedList listSiteDetectors(final String resourceGroupName, final String siteName, final String diagnosticCategory) { + ServiceResponse> response = listSiteDetectorsSinglePageAsync(resourceGroupName, siteName, diagnosticCategory).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDetectorsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteDetectorsAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDetectorsSinglePageAsync(resourceGroupName, siteName, diagnosticCategory), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDetectorsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable> listSiteDetectorsAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory) { + return listSiteDetectorsWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable>> listSiteDetectorsWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory) { + return listSiteDetectorsSinglePageAsync(resourceGroupName, siteName, diagnosticCategory) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteDetectorsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Detectors. + * Get Detectors. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param siteName Site Name + ServiceResponse> * @param diagnosticCategory Diagnostic Category + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DetectorDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDetectorsSinglePageAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory 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.listSiteDetectors(resourceGroupName, siteName, diagnosticCategory, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDetectorsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDetectorsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Detector. + * Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param detectorName Detector Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorDefinitionInner> object if successful. + */ + public PagedList getSiteDetector(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName) { + ServiceResponse> response = getSiteDetectorSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, detectorName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getSiteDetectorNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Detector. + * Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param detectorName Detector Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getSiteDetectorAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getSiteDetectorSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, detectorName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getSiteDetectorNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Detector. + * Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param detectorName Detector Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable> getSiteDetectorAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName) { + return getSiteDetectorWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, detectorName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Detector. + * Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param detectorName Detector Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable>> getSiteDetectorWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName) { + return getSiteDetectorSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, detectorName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getSiteDetectorNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Detector. + * Get Detector. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param siteName Site Name + ServiceResponse> * @param diagnosticCategory Diagnostic Category + ServiceResponse> * @param detectorName Detector Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DetectorDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getSiteDetectorSinglePageAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null."); + } + if (detectorName == null) { + throw new IllegalArgumentException("Parameter detectorName 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.getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detectorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getSiteDetectorDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getSiteDetectorDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticDetectorResponseInner object if successful. + */ + public DiagnosticDetectorResponseInner executeSiteDetector(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory) { + return executeSiteDetectorWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory).toBlocking().single().body(); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture executeSiteDetectorAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(executeSiteDetectorWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory), serviceCallback); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticDetectorResponseInner object + */ + public Observable executeSiteDetectorAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory) { + return executeSiteDetectorWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory).map(new Func1, DiagnosticDetectorResponseInner>() { + @Override + public DiagnosticDetectorResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticDetectorResponseInner object + */ + public Observable> executeSiteDetectorWithServiceResponseAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory) { + 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 (detectorName == null) { + throw new IllegalArgumentException("Parameter detectorName is required and cannot be null."); + } + if (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory 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"; + final DateTime startTime = null; + final DateTime endTime = null; + final String timeGrain = null; + return service.executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, this.client.subscriptionId(), startTime, endTime, timeGrain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = executeSiteDetectorDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticDetectorResponseInner object if successful. + */ + public DiagnosticDetectorResponseInner executeSiteDetector(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, DateTime startTime, DateTime endTime, String timeGrain) { + return executeSiteDetectorWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, startTime, endTime, timeGrain).toBlocking().single().body(); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture executeSiteDetectorAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, DateTime startTime, DateTime endTime, String timeGrain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(executeSiteDetectorWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, startTime, endTime, timeGrain), serviceCallback); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticDetectorResponseInner object + */ + public Observable executeSiteDetectorAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, DateTime startTime, DateTime endTime, String timeGrain) { + return executeSiteDetectorWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, startTime, endTime, timeGrain).map(new Func1, DiagnosticDetectorResponseInner>() { + @Override + public DiagnosticDetectorResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticDetectorResponseInner object + */ + public Observable> executeSiteDetectorWithServiceResponseAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, DateTime startTime, DateTime endTime, String timeGrain) { + 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 (detectorName == null) { + throw new IllegalArgumentException("Parameter detectorName is required and cannot be null."); + } + if (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory 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.executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, this.client.subscriptionId(), startTime, endTime, timeGrain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = executeSiteDetectorDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse executeSiteDetectorDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DiagnosticCategoryInner> object if successful. + */ + public PagedList listSiteDiagnosticCategoriesSlot(final String resourceGroupName, final String siteName, final String slot) { + ServiceResponse> response = listSiteDiagnosticCategoriesSlotSinglePageAsync(resourceGroupName, siteName, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDiagnosticCategoriesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param slot Slot Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteDiagnosticCategoriesSlotAsync(final String resourceGroupName, final String siteName, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDiagnosticCategoriesSlotSinglePageAsync(resourceGroupName, siteName, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDiagnosticCategoriesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DiagnosticCategoryInner> object + */ + public Observable> listSiteDiagnosticCategoriesSlotAsync(final String resourceGroupName, final String siteName, final String slot) { + return listSiteDiagnosticCategoriesSlotWithServiceResponseAsync(resourceGroupName, siteName, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DiagnosticCategoryInner> object + */ + public Observable>> listSiteDiagnosticCategoriesSlotWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String slot) { + return listSiteDiagnosticCategoriesSlotSinglePageAsync(resourceGroupName, siteName, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteDiagnosticCategoriesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param siteName Site Name + ServiceResponse> * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DiagnosticCategoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDiagnosticCategoriesSlotSinglePageAsync(final String resourceGroupName, final String siteName, final String slot) { + 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 (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-03-01"; + return service.listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDiagnosticCategoriesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDiagnosticCategoriesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Diagnostics Category. + * Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticCategoryInner object if successful. + */ + public DiagnosticCategoryInner getSiteDiagnosticCategorySlot(String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + return getSiteDiagnosticCategorySlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, slot).toBlocking().single().body(); + } + + /** + * Get Diagnostics Category. + * Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSiteDiagnosticCategorySlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteDiagnosticCategorySlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, slot), serviceCallback); + } + + /** + * Get Diagnostics Category. + * Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticCategoryInner object + */ + public Observable getSiteDiagnosticCategorySlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + return getSiteDiagnosticCategorySlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, slot).map(new Func1, DiagnosticCategoryInner>() { + @Override + public DiagnosticCategoryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Diagnostics Category. + * Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticCategoryInner object + */ + public Observable> getSiteDiagnosticCategorySlotWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory 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-03-01"; + return service.getSiteDiagnosticCategorySlot(resourceGroupName, siteName, diagnosticCategory, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteDiagnosticCategorySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteDiagnosticCategorySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AnalysisDefinitionInner> object if successful. + */ + public PagedList listSiteAnalysesSlot(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot) { + ServiceResponse> response = listSiteAnalysesSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteAnalysesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteAnalysesSlotAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteAnalysesSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteAnalysesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AnalysisDefinitionInner> object + */ + public Observable> listSiteAnalysesSlotAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot) { + return listSiteAnalysesSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AnalysisDefinitionInner> object + */ + public Observable>> listSiteAnalysesSlotWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot) { + return listSiteAnalysesSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteAnalysesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param siteName Site Name + ServiceResponse> * @param diagnosticCategory Diagnostic Category + ServiceResponse> * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AnalysisDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteAnalysesSlotSinglePageAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory 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-03-01"; + return service.listSiteAnalysesSlot(resourceGroupName, siteName, diagnosticCategory, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteAnalysesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteAnalysesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Site Analysis. + * Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param analysisName Analysis Name + * @param slot Slot - optional + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticAnalysisInner object if successful. + */ + public DiagnosticAnalysisInner getSiteAnalysisSlot(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + return getSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot).toBlocking().single().body(); + } + + /** + * Get Site Analysis. + * Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param analysisName Analysis Name + * @param slot Slot - optional + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSiteAnalysisSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot), serviceCallback); + } + + /** + * Get Site Analysis. + * Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param analysisName Analysis Name + * @param slot Slot - optional + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable getSiteAnalysisSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + return getSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot).map(new Func1, DiagnosticAnalysisInner>() { + @Override + public DiagnosticAnalysisInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Site Analysis. + * Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param analysisName Analysis Name + * @param slot Slot - optional + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable> getSiteAnalysisSlotWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null."); + } + if (analysisName == null) { + throw new IllegalArgumentException("Parameter analysisName 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-03-01"; + return service.getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteAnalysisSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteAnalysisSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticAnalysisInner object if successful. + */ + public DiagnosticAnalysisInner executeSiteAnalysisSlot(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + return executeSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot).toBlocking().single().body(); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param slot Slot Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture executeSiteAnalysisSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(executeSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot), serviceCallback); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable executeSiteAnalysisSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + return executeSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot).map(new Func1, DiagnosticAnalysisInner>() { + @Override + public DiagnosticAnalysisInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable> executeSiteAnalysisSlotWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null."); + } + if (analysisName == null) { + throw new IllegalArgumentException("Parameter analysisName 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-03-01"; + final DateTime startTime = null; + final DateTime endTime = null; + final String timeGrain = null; + return service.executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, this.client.subscriptionId(), startTime, endTime, timeGrain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = executeSiteAnalysisSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param slot Slot Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticAnalysisInner object if successful. + */ + public DiagnosticAnalysisInner executeSiteAnalysisSlot(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot, DateTime startTime, DateTime endTime, String timeGrain) { + return executeSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, startTime, endTime, timeGrain).toBlocking().single().body(); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param slot Slot Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture executeSiteAnalysisSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot, DateTime startTime, DateTime endTime, String timeGrain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(executeSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, startTime, endTime, timeGrain), serviceCallback); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param slot Slot Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable executeSiteAnalysisSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot, DateTime startTime, DateTime endTime, String timeGrain) { + return executeSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, startTime, endTime, timeGrain).map(new Func1, DiagnosticAnalysisInner>() { + @Override + public DiagnosticAnalysisInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Analysis. + * Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Category Name + * @param analysisName Analysis Resource Name + * @param slot Slot Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticAnalysisInner object + */ + public Observable> executeSiteAnalysisSlotWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot, DateTime startTime, DateTime endTime, String timeGrain) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null."); + } + if (analysisName == null) { + throw new IllegalArgumentException("Parameter analysisName 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-03-01"; + return service.executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, this.client.subscriptionId(), startTime, endTime, timeGrain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = executeSiteAnalysisSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse executeSiteAnalysisSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorDefinitionInner> object if successful. + */ + public PagedList listSiteDetectorsSlot(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot) { + ServiceResponse> response = listSiteDetectorsSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDetectorsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteDetectorsSlotAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDetectorsSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDetectorsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable> listSiteDetectorsSlotAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot) { + return listSiteDetectorsSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable>> listSiteDetectorsSlotWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot) { + return listSiteDetectorsSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteDetectorsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Detectors. + * Get Detectors. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param siteName Site Name + ServiceResponse> * @param diagnosticCategory Diagnostic Category + ServiceResponse> * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DetectorDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDetectorsSlotSinglePageAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory 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-03-01"; + return service.listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDetectorsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDetectorsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Detector. + * Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param detectorName Detector Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorDefinitionInner> object if successful. + */ + public PagedList getSiteDetectorSlot(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName, final String slot) { + ServiceResponse> response = getSiteDetectorSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getSiteDetectorSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Detector. + * Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param detectorName Detector Name + * @param slot Slot Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getSiteDetectorSlotAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getSiteDetectorSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getSiteDetectorSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Detector. + * Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param detectorName Detector Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable> getSiteDetectorSlotAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName, final String slot) { + return getSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Detector. + * Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param diagnosticCategory Diagnostic Category + * @param detectorName Detector Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable>> getSiteDetectorSlotWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName, final String slot) { + return getSiteDetectorSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getSiteDetectorSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Detector. + * Get Detector. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param siteName Site Name + ServiceResponse> * @param diagnosticCategory Diagnostic Category + ServiceResponse> * @param detectorName Detector Name + ServiceResponse> * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DetectorDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getSiteDetectorSlotSinglePageAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName, final String slot) { + 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 (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null."); + } + if (detectorName == null) { + throw new IllegalArgumentException("Parameter detectorName 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-03-01"; + return service.getSiteDetectorSlot(resourceGroupName, siteName, diagnosticCategory, detectorName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getSiteDetectorSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getSiteDetectorSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticDetectorResponseInner object if successful. + */ + public DiagnosticDetectorResponseInner executeSiteDetectorSlot(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot) { + return executeSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, slot).toBlocking().single().body(); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param slot Slot Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture executeSiteDetectorSlotAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(executeSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, slot), serviceCallback); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticDetectorResponseInner object + */ + public Observable executeSiteDetectorSlotAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot) { + return executeSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, slot).map(new Func1, DiagnosticDetectorResponseInner>() { + @Override + public DiagnosticDetectorResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticDetectorResponseInner object + */ + public Observable> executeSiteDetectorSlotWithServiceResponseAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot) { + 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 (detectorName == null) { + throw new IllegalArgumentException("Parameter detectorName is required and cannot be null."); + } + if (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory 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-03-01"; + final DateTime startTime = null; + final DateTime endTime = null; + final String timeGrain = null; + return service.executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, diagnosticCategory, slot, this.client.subscriptionId(), startTime, endTime, timeGrain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = executeSiteDetectorSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param slot Slot Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnosticDetectorResponseInner object if successful. + */ + public DiagnosticDetectorResponseInner executeSiteDetectorSlot(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot, DateTime startTime, DateTime endTime, String timeGrain) { + return executeSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, slot, startTime, endTime, timeGrain).toBlocking().single().body(); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param slot Slot Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture executeSiteDetectorSlotAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot, DateTime startTime, DateTime endTime, String timeGrain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(executeSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, slot, startTime, endTime, timeGrain), serviceCallback); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param slot Slot Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticDetectorResponseInner object + */ + public Observable executeSiteDetectorSlotAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot, DateTime startTime, DateTime endTime, String timeGrain) { + return executeSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, slot, startTime, endTime, timeGrain).map(new Func1, DiagnosticDetectorResponseInner>() { + @Override + public DiagnosticDetectorResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute Detector. + * Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param diagnosticCategory Category Name + * @param slot Slot Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnosticDetectorResponseInner object + */ + public Observable> executeSiteDetectorSlotWithServiceResponseAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot, DateTime startTime, DateTime endTime, String timeGrain) { + 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 (detectorName == null) { + throw new IllegalArgumentException("Parameter detectorName is required and cannot be null."); + } + if (diagnosticCategory == null) { + throw new IllegalArgumentException("Parameter diagnosticCategory 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-03-01"; + return service.executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, diagnosticCategory, slot, this.client.subscriptionId(), startTime, endTime, timeGrain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = executeSiteDetectorSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse executeSiteDetectorSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DiagnosticCategoryInner> object if successful. + */ + public PagedList listSiteDiagnosticCategoriesNext(final String nextPageLink) { + ServiceResponse> response = listSiteDiagnosticCategoriesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDiagnosticCategoriesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteDiagnosticCategoriesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDiagnosticCategoriesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDiagnosticCategoriesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DiagnosticCategoryInner> object + */ + public Observable> listSiteDiagnosticCategoriesNextAsync(final String nextPageLink) { + return listSiteDiagnosticCategoriesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DiagnosticCategoryInner> object + */ + public Observable>> listSiteDiagnosticCategoriesNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteDiagnosticCategoriesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteDiagnosticCategoriesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DiagnosticCategoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDiagnosticCategoriesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSiteDiagnosticCategoriesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDiagnosticCategoriesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDiagnosticCategoriesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AnalysisDefinitionInner> object if successful. + */ + public PagedList listSiteAnalysesNext(final String nextPageLink) { + ServiceResponse> response = listSiteAnalysesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteAnalysesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteAnalysesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteAnalysesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteAnalysesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AnalysisDefinitionInner> object + */ + public Observable> listSiteAnalysesNextAsync(final String nextPageLink) { + return listSiteAnalysesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AnalysisDefinitionInner> object + */ + public Observable>> listSiteAnalysesNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteAnalysesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteAnalysesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AnalysisDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteAnalysesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSiteAnalysesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteAnalysesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteAnalysesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorDefinitionInner> object if successful. + */ + public PagedList listSiteDetectorsNext(final String nextPageLink) { + ServiceResponse> response = listSiteDetectorsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDetectorsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteDetectorsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDetectorsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDetectorsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable> listSiteDetectorsNextAsync(final String nextPageLink) { + return listSiteDetectorsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable>> listSiteDetectorsNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteDetectorsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteDetectorsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Detectors. + * Get Detectors. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DetectorDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDetectorsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSiteDetectorsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDetectorsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDetectorsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Detector. + * Get Detector. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorDefinitionInner> object if successful. + */ + public PagedList getSiteDetectorNext(final String nextPageLink) { + ServiceResponse> response = getSiteDetectorNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getSiteDetectorNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Detector. + * Get Detector. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getSiteDetectorNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getSiteDetectorNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getSiteDetectorNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Detector. + * Get Detector. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable> getSiteDetectorNextAsync(final String nextPageLink) { + return getSiteDetectorNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Detector. + * Get Detector. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable>> getSiteDetectorNextWithServiceResponseAsync(final String nextPageLink) { + return getSiteDetectorNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getSiteDetectorNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Detector. + * Get Detector. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DetectorDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getSiteDetectorNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.getSiteDetectorNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getSiteDetectorNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getSiteDetectorNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DiagnosticCategoryInner> object if successful. + */ + public PagedList listSiteDiagnosticCategoriesSlotNext(final String nextPageLink) { + ServiceResponse> response = listSiteDiagnosticCategoriesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDiagnosticCategoriesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteDiagnosticCategoriesSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDiagnosticCategoriesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDiagnosticCategoriesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DiagnosticCategoryInner> object + */ + public Observable> listSiteDiagnosticCategoriesSlotNextAsync(final String nextPageLink) { + return listSiteDiagnosticCategoriesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DiagnosticCategoryInner> object + */ + public Observable>> listSiteDiagnosticCategoriesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteDiagnosticCategoriesSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteDiagnosticCategoriesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Diagnostics Categories. + * Get Diagnostics Categories. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DiagnosticCategoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDiagnosticCategoriesSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSiteDiagnosticCategoriesSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDiagnosticCategoriesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDiagnosticCategoriesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AnalysisDefinitionInner> object if successful. + */ + public PagedList listSiteAnalysesSlotNext(final String nextPageLink) { + ServiceResponse> response = listSiteAnalysesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteAnalysesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteAnalysesSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteAnalysesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteAnalysesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AnalysisDefinitionInner> object + */ + public Observable> listSiteAnalysesSlotNextAsync(final String nextPageLink) { + return listSiteAnalysesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AnalysisDefinitionInner> object + */ + public Observable>> listSiteAnalysesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteAnalysesSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteAnalysesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Site Analyses. + * Get Site Analyses. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AnalysisDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteAnalysesSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSiteAnalysesSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteAnalysesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteAnalysesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorDefinitionInner> object if successful. + */ + public PagedList listSiteDetectorsSlotNext(final String nextPageLink) { + ServiceResponse> response = listSiteDetectorsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDetectorsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteDetectorsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDetectorsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDetectorsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable> listSiteDetectorsSlotNextAsync(final String nextPageLink) { + return listSiteDetectorsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Detectors. + * Get Detectors. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable>> listSiteDetectorsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteDetectorsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteDetectorsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Detectors. + * Get Detectors. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DetectorDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDetectorsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSiteDetectorsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDetectorsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDetectorsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get Detector. + * Get Detector. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorDefinitionInner> object if successful. + */ + public PagedList getSiteDetectorSlotNext(final String nextPageLink) { + ServiceResponse> response = getSiteDetectorSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getSiteDetectorSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get Detector. + * Get Detector. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getSiteDetectorSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getSiteDetectorSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getSiteDetectorSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get Detector. + * Get Detector. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable> getSiteDetectorSlotNextAsync(final String nextPageLink) { + return getSiteDetectorSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get Detector. + * Get Detector. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DetectorDefinitionInner> object + */ + public Observable>> getSiteDetectorSlotNextWithServiceResponseAsync(final String nextPageLink) { + return getSiteDetectorSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getSiteDetectorSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get Detector. + * Get Detector. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DetectorDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getSiteDetectorSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.getSiteDetectorSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getSiteDetectorSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getSiteDetectorSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainAvailablilityCheckResultInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainAvailablilityCheckResultInner.java new file mode 100644 index 00000000000..f412994ab57 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainAvailablilityCheckResultInner.java @@ -0,0 +1,100 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.DomainType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Domain availablility check result. + */ +public class DomainAvailablilityCheckResultInner { + /** + * Name of the domain. + */ + @JsonProperty(value = "name") + private String name; + + /** + * <code>true</code> if domain can be purchased using + * CreateDomain API; otherwise, <code>false</code>. + */ + @JsonProperty(value = "available") + private Boolean available; + + /** + * Valid values are Regular domain: Azure will charge the full price of + * domain registration, SoftDeleted: Purchasing this domain will simply + * restore it and this operation will not cost anything. Possible values + * include: 'Regular', 'SoftDeleted'. + */ + @JsonProperty(value = "domainType") + private DomainType domainType; + + /** + * 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 DomainAvailablilityCheckResultInner object itself. + */ + public DomainAvailablilityCheckResultInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the available value. + * + * @return the available value + */ + public Boolean available() { + return this.available; + } + + /** + * Set the available value. + * + * @param available the available value to set + * @return the DomainAvailablilityCheckResultInner object itself. + */ + public DomainAvailablilityCheckResultInner withAvailable(Boolean available) { + this.available = available; + return this; + } + + /** + * Get the domainType value. + * + * @return the domainType value + */ + public DomainType domainType() { + return this.domainType; + } + + /** + * Set the domainType value. + * + * @param domainType the domainType value to set + * @return the DomainAvailablilityCheckResultInner object itself. + */ + public DomainAvailablilityCheckResultInner withDomainType(DomainType domainType) { + this.domainType = domainType; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainControlCenterSsoRequestInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainControlCenterSsoRequestInner.java new file mode 100644 index 00000000000..054b6612f61 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainControlCenterSsoRequestInner.java @@ -0,0 +1,63 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Single sign-on request information for domain management. + */ +public class DomainControlCenterSsoRequestInner { + /** + * URL where the single sign-on request is to be made. + */ + @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) + private String url; + + /** + * Post parameter key. + */ + @JsonProperty(value = "postParameterKey", access = JsonProperty.Access.WRITE_ONLY) + private String postParameterKey; + + /** + * Post parameter value. Client should use + * 'application/x-www-form-urlencoded' encoding for this value. + */ + @JsonProperty(value = "postParameterValue", access = JsonProperty.Access.WRITE_ONLY) + private String postParameterValue; + + /** + * Get the url value. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Get the postParameterKey value. + * + * @return the postParameterKey value + */ + public String postParameterKey() { + return this.postParameterKey; + } + + /** + * Get the postParameterValue value. + * + * @return the postParameterValue value + */ + public String postParameterValue() { + return this.postParameterValue; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainInner.java new file mode 100644 index 00000000000..f0f40122aea --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainInner.java @@ -0,0 +1,462 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.Contact; +import com.microsoft.azure.management.web.DomainStatus; +import com.microsoft.azure.management.web.ProvisioningState; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.HostName; +import com.microsoft.azure.management.web.DomainPurchaseConsent; +import com.microsoft.azure.management.web.DnsType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Information about a domain. + */ +@JsonFlatten +public class DomainInner extends Resource { + /** + * Administrative contact. + */ + @JsonProperty(value = "properties.contactAdmin", required = true) + private Contact contactAdmin; + + /** + * Billing contact. + */ + @JsonProperty(value = "properties.contactBilling", required = true) + private Contact contactBilling; + + /** + * Registrant contact. + */ + @JsonProperty(value = "properties.contactRegistrant", required = true) + private Contact contactRegistrant; + + /** + * Technical contact. + */ + @JsonProperty(value = "properties.contactTech", required = true) + private Contact contactTech; + + /** + * Domain registration status. Possible values include: 'Active', + * 'Awaiting', 'Cancelled', 'Confiscated', 'Disabled', 'Excluded', + * 'Expired', 'Failed', 'Held', 'Locked', 'Parked', 'Pending', 'Reserved', + * 'Reverted', 'Suspended', 'Transferred', 'Unknown', 'Unlocked', + * 'Unparked', 'Updated', 'JsonConverterFailed'. + */ + @JsonProperty(value = "properties.registrationStatus", access = JsonProperty.Access.WRITE_ONLY) + private DomainStatus registrationStatus; + + /** + * Domain provisioning state. Possible values include: 'Succeeded', + * 'Failed', 'Canceled', 'InProgress', 'Deleting'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name servers. + */ + @JsonProperty(value = "properties.nameServers", access = JsonProperty.Access.WRITE_ONLY) + private List nameServers; + + /** + * <code>true</code> if domain privacy is enabled for this + * domain; otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.privacy") + private Boolean privacy; + + /** + * Domain creation timestamp. + */ + @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdTime; + + /** + * Domain expiration timestamp. + */ + @JsonProperty(value = "properties.expirationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime expirationTime; + + /** + * Timestamp when the domain was renewed last time. + */ + @JsonProperty(value = "properties.lastRenewedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastRenewedTime; + + /** + * <code>true</code> if the domain should be automatically + * renewed; otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.autoRenew") + private Boolean autoRenew; + + /** + * <code>true</code> if Azure can assign this domain to App + * Service apps; otherwise, <code>false</code>. This value will + * be <code>true</code> if domain registration status is active + * and + * it is hosted on name servers Azure has programmatic access to. + */ + @JsonProperty(value = "properties.readyForDnsRecordManagement", access = JsonProperty.Access.WRITE_ONLY) + private Boolean readyForDnsRecordManagement; + + /** + * All hostnames derived from the domain and assigned to Azure resources. + */ + @JsonProperty(value = "properties.managedHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List managedHostNames; + + /** + * Legal agreement consent. + */ + @JsonProperty(value = "properties.consent", required = true) + private DomainPurchaseConsent consent; + + /** + * Reasons why domain is not renewable. + */ + @JsonProperty(value = "properties.domainNotRenewableReasons", access = JsonProperty.Access.WRITE_ONLY) + private List domainNotRenewableReasons; + + /** + * Current DNS type. Possible values include: 'AzureDns', + * 'DefaultDomainRegistrarDns'. + */ + @JsonProperty(value = "properties.dnsType") + private DnsType dnsType; + + /** + * Azure DNS Zone to use. + */ + @JsonProperty(value = "properties.dnsZoneId") + private String dnsZoneId; + + /** + * Target DNS type (would be used for migration). Possible values include: + * 'AzureDns', 'DefaultDomainRegistrarDns'. + */ + @JsonProperty(value = "properties.targetDnsType") + private DnsType targetDnsType; + + /** + * The authCode property. + */ + @JsonProperty(value = "properties.authCode") + private String authCode; + + /** + * Get the contactAdmin value. + * + * @return the contactAdmin value + */ + public Contact contactAdmin() { + return this.contactAdmin; + } + + /** + * Set the contactAdmin value. + * + * @param contactAdmin the contactAdmin value to set + * @return the DomainInner object itself. + */ + public DomainInner withContactAdmin(Contact contactAdmin) { + this.contactAdmin = contactAdmin; + return this; + } + + /** + * Get the contactBilling value. + * + * @return the contactBilling value + */ + public Contact contactBilling() { + return this.contactBilling; + } + + /** + * Set the contactBilling value. + * + * @param contactBilling the contactBilling value to set + * @return the DomainInner object itself. + */ + public DomainInner withContactBilling(Contact contactBilling) { + this.contactBilling = contactBilling; + return this; + } + + /** + * Get the contactRegistrant value. + * + * @return the contactRegistrant value + */ + public Contact contactRegistrant() { + return this.contactRegistrant; + } + + /** + * Set the contactRegistrant value. + * + * @param contactRegistrant the contactRegistrant value to set + * @return the DomainInner object itself. + */ + public DomainInner withContactRegistrant(Contact contactRegistrant) { + this.contactRegistrant = contactRegistrant; + return this; + } + + /** + * Get the contactTech value. + * + * @return the contactTech value + */ + public Contact contactTech() { + return this.contactTech; + } + + /** + * Set the contactTech value. + * + * @param contactTech the contactTech value to set + * @return the DomainInner object itself. + */ + public DomainInner withContactTech(Contact contactTech) { + this.contactTech = contactTech; + return this; + } + + /** + * Get the registrationStatus value. + * + * @return the registrationStatus value + */ + public DomainStatus registrationStatus() { + return this.registrationStatus; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the nameServers value. + * + * @return the nameServers value + */ + public List nameServers() { + return this.nameServers; + } + + /** + * Get the privacy value. + * + * @return the privacy value + */ + public Boolean privacy() { + return this.privacy; + } + + /** + * Set the privacy value. + * + * @param privacy the privacy value to set + * @return the DomainInner object itself. + */ + public DomainInner withPrivacy(Boolean privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get the createdTime value. + * + * @return the createdTime value + */ + public DateTime createdTime() { + return this.createdTime; + } + + /** + * Get the expirationTime value. + * + * @return the expirationTime value + */ + public DateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get the lastRenewedTime value. + * + * @return the lastRenewedTime value + */ + public DateTime lastRenewedTime() { + return this.lastRenewedTime; + } + + /** + * Get the autoRenew value. + * + * @return the autoRenew value + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set the autoRenew value. + * + * @param autoRenew the autoRenew value to set + * @return the DomainInner object itself. + */ + public DomainInner withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get the readyForDnsRecordManagement value. + * + * @return the readyForDnsRecordManagement value + */ + public Boolean readyForDnsRecordManagement() { + return this.readyForDnsRecordManagement; + } + + /** + * Get the managedHostNames value. + * + * @return the managedHostNames value + */ + public List managedHostNames() { + return this.managedHostNames; + } + + /** + * Get the consent value. + * + * @return the consent value + */ + public DomainPurchaseConsent consent() { + return this.consent; + } + + /** + * Set the consent value. + * + * @param consent the consent value to set + * @return the DomainInner object itself. + */ + public DomainInner withConsent(DomainPurchaseConsent consent) { + this.consent = consent; + return this; + } + + /** + * Get the domainNotRenewableReasons value. + * + * @return the domainNotRenewableReasons value + */ + public List domainNotRenewableReasons() { + return this.domainNotRenewableReasons; + } + + /** + * Get the dnsType value. + * + * @return the dnsType value + */ + public DnsType dnsType() { + return this.dnsType; + } + + /** + * Set the dnsType value. + * + * @param dnsType the dnsType value to set + * @return the DomainInner object itself. + */ + public DomainInner withDnsType(DnsType dnsType) { + this.dnsType = dnsType; + return this; + } + + /** + * Get the dnsZoneId value. + * + * @return the dnsZoneId value + */ + public String dnsZoneId() { + return this.dnsZoneId; + } + + /** + * Set the dnsZoneId value. + * + * @param dnsZoneId the dnsZoneId value to set + * @return the DomainInner object itself. + */ + public DomainInner withDnsZoneId(String dnsZoneId) { + this.dnsZoneId = dnsZoneId; + return this; + } + + /** + * Get the targetDnsType value. + * + * @return the targetDnsType value + */ + public DnsType targetDnsType() { + return this.targetDnsType; + } + + /** + * Set the targetDnsType value. + * + * @param targetDnsType the targetDnsType value to set + * @return the DomainInner object itself. + */ + public DomainInner withTargetDnsType(DnsType targetDnsType) { + this.targetDnsType = targetDnsType; + return this; + } + + /** + * Get the authCode value. + * + * @return the authCode value + */ + public String authCode() { + return this.authCode; + } + + /** + * Set the authCode value. + * + * @param authCode the authCode value to set + * @return the DomainInner object itself. + */ + public DomainInner withAuthCode(String authCode) { + this.authCode = authCode; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainOwnershipIdentifierInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainOwnershipIdentifierInner.java new file mode 100644 index 00000000000..cd935f8c879 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainOwnershipIdentifierInner.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Domain ownership Identifier. + */ +@JsonFlatten +public class DomainOwnershipIdentifierInner extends ProxyOnlyResource { + /** + * Ownership Id. + */ + @JsonProperty(value = "properties.ownershipId") + private String ownershipId; + + /** + * Get the ownershipId value. + * + * @return the ownershipId value + */ + public String ownershipId() { + return this.ownershipId; + } + + /** + * Set the ownershipId value. + * + * @param ownershipId the ownershipId value to set + * @return the DomainOwnershipIdentifierInner object itself. + */ + public DomainOwnershipIdentifierInner withOwnershipId(String ownershipId) { + this.ownershipId = ownershipId; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainPatchResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainPatchResourceInner.java new file mode 100644 index 00000000000..6495ef6df32 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainPatchResourceInner.java @@ -0,0 +1,462 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.Contact; +import com.microsoft.azure.management.web.DomainStatus; +import com.microsoft.azure.management.web.ProvisioningState; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.HostName; +import com.microsoft.azure.management.web.DomainPurchaseConsent; +import com.microsoft.azure.management.web.DnsType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * ARM resource for a domain. + */ +@JsonFlatten +public class DomainPatchResourceInner extends ProxyOnlyResource { + /** + * Administrative contact. + */ + @JsonProperty(value = "properties.contactAdmin", required = true) + private Contact contactAdmin; + + /** + * Billing contact. + */ + @JsonProperty(value = "properties.contactBilling", required = true) + private Contact contactBilling; + + /** + * Registrant contact. + */ + @JsonProperty(value = "properties.contactRegistrant", required = true) + private Contact contactRegistrant; + + /** + * Technical contact. + */ + @JsonProperty(value = "properties.contactTech", required = true) + private Contact contactTech; + + /** + * Domain registration status. Possible values include: 'Active', + * 'Awaiting', 'Cancelled', 'Confiscated', 'Disabled', 'Excluded', + * 'Expired', 'Failed', 'Held', 'Locked', 'Parked', 'Pending', 'Reserved', + * 'Reverted', 'Suspended', 'Transferred', 'Unknown', 'Unlocked', + * 'Unparked', 'Updated', 'JsonConverterFailed'. + */ + @JsonProperty(value = "properties.registrationStatus", access = JsonProperty.Access.WRITE_ONLY) + private DomainStatus registrationStatus; + + /** + * Domain provisioning state. Possible values include: 'Succeeded', + * 'Failed', 'Canceled', 'InProgress', 'Deleting'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name servers. + */ + @JsonProperty(value = "properties.nameServers", access = JsonProperty.Access.WRITE_ONLY) + private List nameServers; + + /** + * <code>true</code> if domain privacy is enabled for this + * domain; otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.privacy") + private Boolean privacy; + + /** + * Domain creation timestamp. + */ + @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdTime; + + /** + * Domain expiration timestamp. + */ + @JsonProperty(value = "properties.expirationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime expirationTime; + + /** + * Timestamp when the domain was renewed last time. + */ + @JsonProperty(value = "properties.lastRenewedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastRenewedTime; + + /** + * <code>true</code> if the domain should be automatically + * renewed; otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.autoRenew") + private Boolean autoRenew; + + /** + * <code>true</code> if Azure can assign this domain to App + * Service apps; otherwise, <code>false</code>. This value will + * be <code>true</code> if domain registration status is active + * and + * it is hosted on name servers Azure has programmatic access to. + */ + @JsonProperty(value = "properties.readyForDnsRecordManagement", access = JsonProperty.Access.WRITE_ONLY) + private Boolean readyForDnsRecordManagement; + + /** + * All hostnames derived from the domain and assigned to Azure resources. + */ + @JsonProperty(value = "properties.managedHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List managedHostNames; + + /** + * Legal agreement consent. + */ + @JsonProperty(value = "properties.consent", required = true) + private DomainPurchaseConsent consent; + + /** + * Reasons why domain is not renewable. + */ + @JsonProperty(value = "properties.domainNotRenewableReasons", access = JsonProperty.Access.WRITE_ONLY) + private List domainNotRenewableReasons; + + /** + * Current DNS type. Possible values include: 'AzureDns', + * 'DefaultDomainRegistrarDns'. + */ + @JsonProperty(value = "properties.dnsType") + private DnsType dnsType; + + /** + * Azure DNS Zone to use. + */ + @JsonProperty(value = "properties.dnsZoneId") + private String dnsZoneId; + + /** + * Target DNS type (would be used for migration). Possible values include: + * 'AzureDns', 'DefaultDomainRegistrarDns'. + */ + @JsonProperty(value = "properties.targetDnsType") + private DnsType targetDnsType; + + /** + * The authCode property. + */ + @JsonProperty(value = "properties.authCode") + private String authCode; + + /** + * Get the contactAdmin value. + * + * @return the contactAdmin value + */ + public Contact contactAdmin() { + return this.contactAdmin; + } + + /** + * Set the contactAdmin value. + * + * @param contactAdmin the contactAdmin value to set + * @return the DomainPatchResourceInner object itself. + */ + public DomainPatchResourceInner withContactAdmin(Contact contactAdmin) { + this.contactAdmin = contactAdmin; + return this; + } + + /** + * Get the contactBilling value. + * + * @return the contactBilling value + */ + public Contact contactBilling() { + return this.contactBilling; + } + + /** + * Set the contactBilling value. + * + * @param contactBilling the contactBilling value to set + * @return the DomainPatchResourceInner object itself. + */ + public DomainPatchResourceInner withContactBilling(Contact contactBilling) { + this.contactBilling = contactBilling; + return this; + } + + /** + * Get the contactRegistrant value. + * + * @return the contactRegistrant value + */ + public Contact contactRegistrant() { + return this.contactRegistrant; + } + + /** + * Set the contactRegistrant value. + * + * @param contactRegistrant the contactRegistrant value to set + * @return the DomainPatchResourceInner object itself. + */ + public DomainPatchResourceInner withContactRegistrant(Contact contactRegistrant) { + this.contactRegistrant = contactRegistrant; + return this; + } + + /** + * Get the contactTech value. + * + * @return the contactTech value + */ + public Contact contactTech() { + return this.contactTech; + } + + /** + * Set the contactTech value. + * + * @param contactTech the contactTech value to set + * @return the DomainPatchResourceInner object itself. + */ + public DomainPatchResourceInner withContactTech(Contact contactTech) { + this.contactTech = contactTech; + return this; + } + + /** + * Get the registrationStatus value. + * + * @return the registrationStatus value + */ + public DomainStatus registrationStatus() { + return this.registrationStatus; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the nameServers value. + * + * @return the nameServers value + */ + public List nameServers() { + return this.nameServers; + } + + /** + * Get the privacy value. + * + * @return the privacy value + */ + public Boolean privacy() { + return this.privacy; + } + + /** + * Set the privacy value. + * + * @param privacy the privacy value to set + * @return the DomainPatchResourceInner object itself. + */ + public DomainPatchResourceInner withPrivacy(Boolean privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get the createdTime value. + * + * @return the createdTime value + */ + public DateTime createdTime() { + return this.createdTime; + } + + /** + * Get the expirationTime value. + * + * @return the expirationTime value + */ + public DateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get the lastRenewedTime value. + * + * @return the lastRenewedTime value + */ + public DateTime lastRenewedTime() { + return this.lastRenewedTime; + } + + /** + * Get the autoRenew value. + * + * @return the autoRenew value + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set the autoRenew value. + * + * @param autoRenew the autoRenew value to set + * @return the DomainPatchResourceInner object itself. + */ + public DomainPatchResourceInner withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get the readyForDnsRecordManagement value. + * + * @return the readyForDnsRecordManagement value + */ + public Boolean readyForDnsRecordManagement() { + return this.readyForDnsRecordManagement; + } + + /** + * Get the managedHostNames value. + * + * @return the managedHostNames value + */ + public List managedHostNames() { + return this.managedHostNames; + } + + /** + * Get the consent value. + * + * @return the consent value + */ + public DomainPurchaseConsent consent() { + return this.consent; + } + + /** + * Set the consent value. + * + * @param consent the consent value to set + * @return the DomainPatchResourceInner object itself. + */ + public DomainPatchResourceInner withConsent(DomainPurchaseConsent consent) { + this.consent = consent; + return this; + } + + /** + * Get the domainNotRenewableReasons value. + * + * @return the domainNotRenewableReasons value + */ + public List domainNotRenewableReasons() { + return this.domainNotRenewableReasons; + } + + /** + * Get the dnsType value. + * + * @return the dnsType value + */ + public DnsType dnsType() { + return this.dnsType; + } + + /** + * Set the dnsType value. + * + * @param dnsType the dnsType value to set + * @return the DomainPatchResourceInner object itself. + */ + public DomainPatchResourceInner withDnsType(DnsType dnsType) { + this.dnsType = dnsType; + return this; + } + + /** + * Get the dnsZoneId value. + * + * @return the dnsZoneId value + */ + public String dnsZoneId() { + return this.dnsZoneId; + } + + /** + * Set the dnsZoneId value. + * + * @param dnsZoneId the dnsZoneId value to set + * @return the DomainPatchResourceInner object itself. + */ + public DomainPatchResourceInner withDnsZoneId(String dnsZoneId) { + this.dnsZoneId = dnsZoneId; + return this; + } + + /** + * Get the targetDnsType value. + * + * @return the targetDnsType value + */ + public DnsType targetDnsType() { + return this.targetDnsType; + } + + /** + * Set the targetDnsType value. + * + * @param targetDnsType the targetDnsType value to set + * @return the DomainPatchResourceInner object itself. + */ + public DomainPatchResourceInner withTargetDnsType(DnsType targetDnsType) { + this.targetDnsType = targetDnsType; + return this; + } + + /** + * Get the authCode value. + * + * @return the authCode value + */ + public String authCode() { + return this.authCode; + } + + /** + * Set the authCode value. + * + * @param authCode the authCode value to set + * @return the DomainPatchResourceInner object itself. + */ + public DomainPatchResourceInner withAuthCode(String authCode) { + this.authCode = authCode; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainRecommendationSearchParametersInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainRecommendationSearchParametersInner.java new file mode 100644 index 00000000000..34102634108 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainRecommendationSearchParametersInner.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Domain recommendation search parameters. + */ +public class DomainRecommendationSearchParametersInner { + /** + * Keywords to be used for generating domain recommendations. + */ + @JsonProperty(value = "keywords") + private String keywords; + + /** + * Maximum number of recommendations. + */ + @JsonProperty(value = "maxDomainRecommendations") + private Integer maxDomainRecommendations; + + /** + * Get the keywords value. + * + * @return the keywords value + */ + public String keywords() { + return this.keywords; + } + + /** + * Set the keywords value. + * + * @param keywords the keywords value to set + * @return the DomainRecommendationSearchParametersInner object itself. + */ + public DomainRecommendationSearchParametersInner withKeywords(String keywords) { + this.keywords = keywords; + return this; + } + + /** + * Get the maxDomainRecommendations value. + * + * @return the maxDomainRecommendations value + */ + public Integer maxDomainRecommendations() { + return this.maxDomainRecommendations; + } + + /** + * Set the maxDomainRecommendations value. + * + * @param maxDomainRecommendations the maxDomainRecommendations value to set + * @return the DomainRecommendationSearchParametersInner object itself. + */ + public DomainRecommendationSearchParametersInner withMaxDomainRecommendations(Integer maxDomainRecommendations) { + this.maxDomainRecommendations = maxDomainRecommendations; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainRegistrationProvidersInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainRegistrationProvidersInner.java new file mode 100644 index 00000000000..2a7fba7015a --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainRegistrationProvidersInner.java @@ -0,0 +1,291 @@ +/** + * 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.web.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DomainRegistrationProviders. + */ +public class DomainRegistrationProvidersInner { + /** The Retrofit service to perform REST calls. */ + private DomainRegistrationProvidersService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * Initializes an instance of DomainRegistrationProvidersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DomainRegistrationProvidersInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(DomainRegistrationProvidersService.class); + this.client = client; + } + + /** + * The interface defining all the services for DomainRegistrationProviders to be + * used by Retrofit to perform actually REST calls. + */ + interface DomainRegistrationProvidersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.DomainRegistrationProviders listOperations" }) + @GET("providers/Microsoft.DomainRegistration/operations") + Observable> listOperations(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.DomainRegistrationProviders listOperationsNext" }) + @GET + Observable> listOperationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmOperationDescriptionInner> object if successful. + */ + public PagedList listOperations() { + ServiceResponse> response = listOperationsSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listOperationsAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listOperationsSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable> listOperationsAsync() { + return listOperationsWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable>> listOperationsWithServiceResponseAsync() { + return listOperationsSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listOperationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CsmOperationDescriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listOperationsSinglePageAsync() { + final String apiVersion = "2015-04-01"; + return service.listOperations(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listOperationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listOperationsDelegate(Response response) throws CloudException, IOException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmOperationDescriptionInner> object if successful. + */ + public PagedList listOperationsNext(final String nextPageLink) { + ServiceResponse> response = listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listOperationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listOperationsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable> listOperationsNextAsync(final String nextPageLink) { + return listOperationsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable>> listOperationsNextWithServiceResponseAsync(final String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listOperationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CsmOperationDescriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listOperationsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listOperationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listOperationsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listOperationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainsInner.java new file mode 100644 index 00000000000..da83fd90c28 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/DomainsInner.java @@ -0,0 +1,2332 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.web.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Domains. + */ +public class DomainsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private DomainsService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * Initializes an instance of DomainsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DomainsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(DomainsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Domains to be + * used by Retrofit to perform actually REST calls. + */ + interface DomainsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Domains checkAvailability" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains list" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains getControlCenterSsoRequest" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains listRecommendations" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") + Observable> getByResourceGroup(@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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains beginCreateOrUpdate" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains delete" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("subscriptionId") String subscriptionId, @Body DomainPatchResourceInner domain, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Domains listOwnershipIdentifiers" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers") + Observable> listOwnershipIdentifiers(@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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains getOwnershipIdentifier" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") + Observable> getOwnershipIdentifier(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains createOrUpdateOwnershipIdentifier" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") + Observable> createOrUpdateOwnershipIdentifier(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DomainOwnershipIdentifierInner domainOwnershipIdentifier, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Domains deleteOwnershipIdentifier" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}", method = "DELETE", hasBody = true) + Observable> deleteOwnershipIdentifier(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains updateOwnershipIdentifier" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") + Observable> updateOwnershipIdentifier(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DomainOwnershipIdentifierInner domainOwnershipIdentifier, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Domains renew" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew") + Observable> renew(@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", "x-ms-logging-context: com.microsoft.azure.management.web.Domains listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Domains listRecommendationsNext" }) + @GET + Observable> listRecommendationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Domains listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Domains listOwnershipIdentifiersNext" }) + @GET + Observable> listOwnershipIdentifiersNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Check if a domain is available for registration. + * Check if a domain is available for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainAvailablilityCheckResultInner object if successful. + */ + public DomainAvailablilityCheckResultInner checkAvailability() { + return checkAvailabilityWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Check if a domain is available for registration. + * Check if a domain is available for registration. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkAvailabilityAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkAvailabilityWithServiceResponseAsync(), serviceCallback); + } + + /** + * Check if a domain is available for registration. + * Check if a domain is available for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainAvailablilityCheckResultInner object + */ + public Observable checkAvailabilityAsync() { + return checkAvailabilityWithServiceResponseAsync().map(new Func1, DomainAvailablilityCheckResultInner>() { + @Override + public DomainAvailablilityCheckResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check if a domain is available for registration. + * Check if a domain is available for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 = "2015-04-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); + } + } + }); + } + + /** + * Check if a domain is available for registration. + * Check if a domain is available for registration. + * + * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainAvailablilityCheckResultInner object if successful. + */ + public DomainAvailablilityCheckResultInner checkAvailability(String name) { + return checkAvailabilityWithServiceResponseAsync(name).toBlocking().single().body(); + } + + /** + * Check if a domain is available for registration. + * Check if a domain is available for registration. + * + * @param name Name of the object. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkAvailabilityAsync(String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkAvailabilityWithServiceResponseAsync(name), serviceCallback); + } + + /** + * Check if a domain is available for registration. + * Check if a domain is available for registration. + * + * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Check if a domain is available for registration. + * Check if a domain is available for registration. + * + * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 = "2015-04-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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all domains in a subscription. + * Get all domains in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DomainInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all domains in a subscription. + * Get all domains in a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all domains in a subscription. + * Get all domains in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get all domains in a subscription. + * Get all domains in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all domains in a subscription. + * Get all domains in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 = "2015-04-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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Generate a single sign-on request for the domain management portal. + * Generate a single sign-on request for the domain management portal. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainControlCenterSsoRequestInner object if successful. + */ + public DomainControlCenterSsoRequestInner getControlCenterSsoRequest() { + return getControlCenterSsoRequestWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Generate a single sign-on request for the domain management portal. + * Generate a single sign-on request for the domain management portal. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getControlCenterSsoRequestAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getControlCenterSsoRequestWithServiceResponseAsync(), serviceCallback); + } + + /** + * Generate a single sign-on request for the domain management portal. + * Generate a single sign-on request for the domain management portal. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainControlCenterSsoRequestInner object + */ + public Observable getControlCenterSsoRequestAsync() { + return getControlCenterSsoRequestWithServiceResponseAsync().map(new Func1, DomainControlCenterSsoRequestInner>() { + @Override + public DomainControlCenterSsoRequestInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generate a single sign-on request for the domain management portal. + * Generate a single sign-on request for the domain management portal. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 = "2015-04-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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get domain name recommendations based on keywords. + * Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<NameIdentifierInner> object if successful. + */ + public PagedList listRecommendations(final DomainRecommendationSearchParametersInner parameters) { + ServiceResponse> response = listRecommendationsSinglePageAsync(parameters).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get domain name recommendations based on keywords. + * Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listRecommendationsAsync(final DomainRecommendationSearchParametersInner parameters, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRecommendationsSinglePageAsync(parameters), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRecommendationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get domain name recommendations based on keywords. + * Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Get domain name recommendations based on keywords. + * Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listRecommendationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get domain name recommendations based on keywords. + * Get domain name recommendations based on keywords. + * + ServiceResponse> * @param parameters Search parameters for domain name recommendations. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 = "2015-04-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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRecommendationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all domains in a resource group. + * Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DomainInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all domains in a resource group. + * Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all domains in a resource group. + * Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all domains in a resource group. + * Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all domains in a resource group. + * Get all domains in a resource group. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainInner> 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 = "2015-04-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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a domain. + * Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainInner object if successful. + */ + public DomainInner getByResourceGroup(String resourceGroupName, String domainName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().single().body(); + } + + /** + * Get a domain. + * Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + } + + /** + * Get a domain. + * Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String domainName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, DomainInner>() { + @Override + public DomainInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a domain. + * Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(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 = "2015-04-01"; + return service.getByResourceGroup(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 = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainInner object if successful. + */ + public DomainInner createOrUpdate(String resourceGroupName, String domainName, DomainInner domain) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domain).toBlocking().last().body(); + } + + /** + * Creates or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domain), serviceCallback); + } + + /** + * Creates or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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.body(); + } + }); + } + + /** + * Creates or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String domainName, DomainInner domain) { + 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."); + } + if (domain == null) { + throw new IllegalArgumentException("Parameter domain is required and cannot be null."); + } + Validator.validate(domain); + final String apiVersion = "2015-04-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 or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainInner object if successful. + */ + public DomainInner beginCreateOrUpdate(String resourceGroupName, String domainName, DomainInner domain) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domain).toBlocking().single().body(); + } + + /** + * Creates or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domain), serviceCallback); + } + + /** + * Creates or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + 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.body(); + } + }); + } + + /** + * Creates or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String domainName, DomainInner domain) { + 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."); + } + if (domain == null) { + throw new IllegalArgumentException("Parameter domain is required and cannot be null."); + } + Validator.validate(domain); + final String apiVersion = "2015-04-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 = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a domain. + * Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String domainName) { + deleteWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().single().body(); + } + + /** + * Delete a domain. + * Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + } + + /** + * Delete a domain. + * Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String domainName) { + return deleteWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a domain. + * Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(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 = "2015-04-01"; + final Boolean forceHardDeleteDomain = null; + 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 = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Delete a domain. + * Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param forceHardDeleteDomain Specify <code>true</code> to delete the domain immediately. The default is <code>false</code> which deletes the domain after 24 hours. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { + deleteWithServiceResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain).toBlocking().single().body(); + } + + /** + * Delete a domain. + * Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param forceHardDeleteDomain Specify <code>true</code> to delete the domain immediately. The default is <code>false</code> which deletes the domain after 24 hours. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain), serviceCallback); + } + + /** + * Delete a domain. + * Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param forceHardDeleteDomain Specify <code>true</code> to delete the domain immediately. The default is <code>false</code> which deletes the domain after 24 hours. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { + return deleteWithServiceResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a domain. + * Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param forceHardDeleteDomain Specify <code>true</code> to delete the domain immediately. The default is <code>false</code> which deletes the domain after 24 hours. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { + 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 = "2015-04-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 = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainInner object if successful. + */ + public DomainInner update(String resourceGroupName, String domainName, DomainPatchResourceInner domain) { + return updateWithServiceResponseAsync(resourceGroupName, domainName, domain).toBlocking().single().body(); + } + + /** + * Creates or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String domainName, DomainPatchResourceInner domain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, domainName, domain), serviceCallback); + } + + /** + * Creates or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable updateAsync(String resourceGroupName, String domainName, DomainPatchResourceInner domain) { + return updateWithServiceResponseAsync(resourceGroupName, domainName, domain).map(new Func1, DomainInner>() { + @Override + public DomainInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a domain. + * Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String domainName, DomainPatchResourceInner domain) { + 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."); + } + if (domain == null) { + throw new IllegalArgumentException("Parameter domain is required and cannot be null."); + } + Validator.validate(domain); + final String apiVersion = "2015-04-01"; + return service.update(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 = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists domain ownership identifiers. + * Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DomainOwnershipIdentifierInner> object if successful. + */ + public PagedList listOwnershipIdentifiers(final String resourceGroupName, final String domainName) { + ServiceResponse> response = listOwnershipIdentifiersSinglePageAsync(resourceGroupName, domainName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listOwnershipIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists domain ownership identifiers. + * Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listOwnershipIdentifiersAsync(final String resourceGroupName, final String domainName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listOwnershipIdentifiersSinglePageAsync(resourceGroupName, domainName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listOwnershipIdentifiersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists domain ownership identifiers. + * Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainOwnershipIdentifierInner> object + */ + public Observable> listOwnershipIdentifiersAsync(final String resourceGroupName, final String domainName) { + return listOwnershipIdentifiersWithServiceResponseAsync(resourceGroupName, domainName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists domain ownership identifiers. + * Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainOwnershipIdentifierInner> object + */ + public Observable>> listOwnershipIdentifiersWithServiceResponseAsync(final String resourceGroupName, final String domainName) { + return listOwnershipIdentifiersSinglePageAsync(resourceGroupName, domainName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listOwnershipIdentifiersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists domain ownership identifiers. + * Lists domain ownership identifiers. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainOwnershipIdentifierInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listOwnershipIdentifiersSinglePageAsync(final String resourceGroupName, final 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 = "2015-04-01"; + return service.listOwnershipIdentifiers(resourceGroupName, domainName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listOwnershipIdentifiersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listOwnershipIdentifiersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get ownership identifier for domain. + * Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainOwnershipIdentifierInner object if successful. + */ + public DomainOwnershipIdentifierInner getOwnershipIdentifier(String resourceGroupName, String domainName, String name) { + return getOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name).toBlocking().single().body(); + } + + /** + * Get ownership identifier for domain. + * Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name), serviceCallback); + } + + /** + * Get ownership identifier for domain. + * Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainOwnershipIdentifierInner object + */ + public Observable getOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name) { + return getOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name).map(new Func1, DomainOwnershipIdentifierInner>() { + @Override + public DomainOwnershipIdentifierInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get ownership identifier for domain. + * Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainOwnershipIdentifierInner object + */ + public Observable> getOwnershipIdentifierWithServiceResponseAsync(String resourceGroupName, String domainName, String name) { + 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 (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 = "2015-04-01"; + return service.getOwnershipIdentifier(resourceGroupName, domainName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getOwnershipIdentifierDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainOwnershipIdentifierInner object if successful. + */ + public DomainOwnershipIdentifierInner createOrUpdateOwnershipIdentifier(String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + return createOrUpdateOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier).toBlocking().single().body(); + } + + /** + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier), serviceCallback); + } + + /** + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainOwnershipIdentifierInner object + */ + public Observable createOrUpdateOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + return createOrUpdateOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier).map(new Func1, DomainOwnershipIdentifierInner>() { + @Override + public DomainOwnershipIdentifierInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainOwnershipIdentifierInner object + */ + public Observable> createOrUpdateOwnershipIdentifierWithServiceResponseAsync(String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + 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 (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 (domainOwnershipIdentifier == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifier is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + final String apiVersion = "2015-04-01"; + return service.createOrUpdateOwnershipIdentifier(resourceGroupName, domainName, name, this.client.subscriptionId(), domainOwnershipIdentifier, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateOwnershipIdentifierDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete ownership identifier for domain. + * Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteOwnershipIdentifier(String resourceGroupName, String domainName, String name) { + deleteOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name).toBlocking().single().body(); + } + + /** + * Delete ownership identifier for domain. + * Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name), serviceCallback); + } + + /** + * Delete ownership identifier for domain. + * Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name) { + return deleteOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete ownership identifier for domain. + * Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteOwnershipIdentifierWithServiceResponseAsync(String resourceGroupName, String domainName, String name) { + 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 (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 = "2015-04-01"; + return service.deleteOwnershipIdentifier(resourceGroupName, domainName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteOwnershipIdentifierDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainOwnershipIdentifierInner object if successful. + */ + public DomainOwnershipIdentifierInner updateOwnershipIdentifier(String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + return updateOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier).toBlocking().single().body(); + } + + /** + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier), serviceCallback); + } + + /** + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainOwnershipIdentifierInner object + */ + public Observable updateOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + return updateOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier).map(new Func1, DomainOwnershipIdentifierInner>() { + @Override + public DomainOwnershipIdentifierInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainOwnershipIdentifierInner object + */ + public Observable> updateOwnershipIdentifierWithServiceResponseAsync(String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + 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 (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 (domainOwnershipIdentifier == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifier is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + final String apiVersion = "2015-04-01"; + return service.updateOwnershipIdentifier(resourceGroupName, domainName, name, this.client.subscriptionId(), domainOwnershipIdentifier, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateOwnershipIdentifierDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Renew a domain. + * Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void renew(String resourceGroupName, String domainName) { + renewWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().single().body(); + } + + /** + * Renew a domain. + * Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture renewAsync(String resourceGroupName, String domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(renewWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + } + + /** + * Renew a domain. + * Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable renewAsync(String resourceGroupName, String domainName) { + return renewWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Renew a domain. + * Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> renewWithServiceResponseAsync(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 = "2015-04-01"; + return service.renew(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 = renewDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse renewDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Get all domains in a subscription. + * Get all domains in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DomainInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all domains in a subscription. + * Get all domains in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all domains in a subscription. + * Get all domains in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all domains in a subscription. + * Get all domains in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all domains in a subscription. + * Get all domains in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get domain name recommendations based on keywords. + * Get domain name recommendations based on keywords. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<NameIdentifierInner> object if successful. + */ + public PagedList listRecommendationsNext(final String nextPageLink) { + ServiceResponse> response = listRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get domain name recommendations based on keywords. + * Get domain name recommendations based on keywords. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listRecommendationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRecommendationsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRecommendationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get domain name recommendations based on keywords. + * Get domain name recommendations based on keywords. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NameIdentifierInner> object + */ + public Observable> listRecommendationsNextAsync(final String nextPageLink) { + return listRecommendationsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get domain name recommendations based on keywords. + * Get domain name recommendations based on keywords. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NameIdentifierInner> object + */ + public Observable>> listRecommendationsNextWithServiceResponseAsync(final String nextPageLink) { + return listRecommendationsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listRecommendationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get domain name recommendations based on keywords. + * Get domain name recommendations based on keywords. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listRecommendationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRecommendationsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRecommendationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all domains in a resource group. + * Get all domains in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DomainInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all domains in a resource group. + * Get all domains in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all domains in a resource group. + * Get all domains in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all domains in a resource group. + * Get all domains in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all domains in a resource group. + * Get all domains in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists domain ownership identifiers. + * Lists domain ownership identifiers. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DomainOwnershipIdentifierInner> object if successful. + */ + public PagedList listOwnershipIdentifiersNext(final String nextPageLink) { + ServiceResponse> response = listOwnershipIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listOwnershipIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists domain ownership identifiers. + * Lists domain ownership identifiers. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listOwnershipIdentifiersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listOwnershipIdentifiersNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listOwnershipIdentifiersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists domain ownership identifiers. + * Lists domain ownership identifiers. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainOwnershipIdentifierInner> object + */ + public Observable> listOwnershipIdentifiersNextAsync(final String nextPageLink) { + return listOwnershipIdentifiersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists domain ownership identifiers. + * Lists domain ownership identifiers. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DomainOwnershipIdentifierInner> object + */ + public Observable>> listOwnershipIdentifiersNextWithServiceResponseAsync(final String nextPageLink) { + return listOwnershipIdentifiersNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listOwnershipIdentifiersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists domain ownership identifiers. + * Lists domain ownership identifiers. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DomainOwnershipIdentifierInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listOwnershipIdentifiersNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listOwnershipIdentifiersNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listOwnershipIdentifiersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listOwnershipIdentifiersNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/FunctionEnvelopeInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/FunctionEnvelopeInner.java new file mode 100644 index 00000000000..9d8efa74672 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/FunctionEnvelopeInner.java @@ -0,0 +1,259 @@ +/** + * 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.web.implementation; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Web Job Information. + */ +@JsonFlatten +public class FunctionEnvelopeInner extends ProxyOnlyResource { + /** + * Function name. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private String functionEnvelopeName; + + /** + * Function App ID. + */ + @JsonProperty(value = "properties.functionAppId", access = JsonProperty.Access.WRITE_ONLY) + private String functionAppId; + + /** + * Script root path URI. + */ + @JsonProperty(value = "properties.scriptRootPathHref") + private String scriptRootPathHref; + + /** + * Script URI. + */ + @JsonProperty(value = "properties.scriptHref") + private String scriptHref; + + /** + * Config URI. + */ + @JsonProperty(value = "properties.configHref") + private String configHref; + + /** + * Secrets file URI. + */ + @JsonProperty(value = "properties.secretsFileHref") + private String secretsFileHref; + + /** + * Function URI. + */ + @JsonProperty(value = "properties.href") + private String href; + + /** + * Config information. + */ + @JsonProperty(value = "properties.config") + private Object config; + + /** + * File list. + */ + @JsonProperty(value = "properties.files") + private Map files; + + /** + * Test data used when testing via the Azure Portal. + */ + @JsonProperty(value = "properties.testData") + private String testData; + + /** + * Get the functionEnvelopeName value. + * + * @return the functionEnvelopeName value + */ + public String functionEnvelopeName() { + return this.functionEnvelopeName; + } + + /** + * Get the functionAppId value. + * + * @return the functionAppId value + */ + public String functionAppId() { + return this.functionAppId; + } + + /** + * Get the scriptRootPathHref value. + * + * @return the scriptRootPathHref value + */ + public String scriptRootPathHref() { + return this.scriptRootPathHref; + } + + /** + * Set the scriptRootPathHref value. + * + * @param scriptRootPathHref the scriptRootPathHref value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withScriptRootPathHref(String scriptRootPathHref) { + this.scriptRootPathHref = scriptRootPathHref; + return this; + } + + /** + * Get the scriptHref value. + * + * @return the scriptHref value + */ + public String scriptHref() { + return this.scriptHref; + } + + /** + * Set the scriptHref value. + * + * @param scriptHref the scriptHref value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withScriptHref(String scriptHref) { + this.scriptHref = scriptHref; + return this; + } + + /** + * Get the configHref value. + * + * @return the configHref value + */ + public String configHref() { + return this.configHref; + } + + /** + * Set the configHref value. + * + * @param configHref the configHref value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withConfigHref(String configHref) { + this.configHref = configHref; + return this; + } + + /** + * Get the secretsFileHref value. + * + * @return the secretsFileHref value + */ + public String secretsFileHref() { + return this.secretsFileHref; + } + + /** + * Set the secretsFileHref value. + * + * @param secretsFileHref the secretsFileHref value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withSecretsFileHref(String secretsFileHref) { + this.secretsFileHref = secretsFileHref; + return this; + } + + /** + * Get the href value. + * + * @return the href value + */ + public String href() { + return this.href; + } + + /** + * Set the href value. + * + * @param href the href value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withHref(String href) { + this.href = href; + return this; + } + + /** + * Get the config value. + * + * @return the config value + */ + public Object config() { + return this.config; + } + + /** + * Set the config value. + * + * @param config the config value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withConfig(Object config) { + this.config = config; + return this; + } + + /** + * Get the files value. + * + * @return the files value + */ + public Map files() { + return this.files; + } + + /** + * Set the files value. + * + * @param files the files value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withFiles(Map files) { + this.files = files; + return this; + } + + /** + * Get the testData value. + * + * @return the testData value + */ + public String testData() { + return this.testData; + } + + /** + * Set the testData value. + * + * @param testData the testData value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withTestData(String testData) { + this.testData = testData; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/FunctionSecretsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/FunctionSecretsInner.java new file mode 100644 index 00000000000..db42019abc4 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/FunctionSecretsInner.java @@ -0,0 +1,72 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Function secrets. + */ +@JsonFlatten +public class FunctionSecretsInner extends ProxyOnlyResource { + /** + * Secret key. + */ + @JsonProperty(value = "properties.key") + private String key; + + /** + * Trigger URL. + */ + @JsonProperty(value = "properties.triggerUrl") + private String triggerUrl; + + /** + * Get the key value. + * + * @return the key value + */ + public String key() { + return this.key; + } + + /** + * Set the key value. + * + * @param key the key value to set + * @return the FunctionSecretsInner object itself. + */ + public FunctionSecretsInner withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the triggerUrl value. + * + * @return the triggerUrl value + */ + public String triggerUrl() { + return this.triggerUrl; + } + + /** + * Set the triggerUrl value. + * + * @param triggerUrl the triggerUrl value to set + * @return the FunctionSecretsInner object itself. + */ + public FunctionSecretsInner withTriggerUrl(String triggerUrl) { + this.triggerUrl = triggerUrl; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/GeoRegionInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/GeoRegionInner.java new file mode 100644 index 00000000000..24f458db7e0 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/GeoRegionInner.java @@ -0,0 +1,65 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Geographical region. + */ +@JsonFlatten +public class GeoRegionInner extends ProxyOnlyResource { + /** + * Region name. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private String geoRegionName; + + /** + * Region description. + */ + @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Display name for region. + */ + @JsonProperty(value = "properties.displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /** + * Get the geoRegionName value. + * + * @return the geoRegionName value + */ + public String geoRegionName() { + return this.geoRegionName; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get the displayName value. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HostNameBindingInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HostNameBindingInner.java new file mode 100644 index 00000000000..897093877e8 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HostNameBindingInner.java @@ -0,0 +1,249 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.AzureResourceType; +import com.microsoft.azure.management.web.CustomHostNameDnsRecordType; +import com.microsoft.azure.management.web.HostNameType; +import com.microsoft.azure.management.web.SslState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * A hostname binding object. + */ +@JsonFlatten +public class HostNameBindingInner extends ProxyOnlyResource { + /** + * App Service app name. + */ + @JsonProperty(value = "properties.siteName") + private String siteName; + + /** + * Fully qualified ARM domain resource URI. + */ + @JsonProperty(value = "properties.domainId") + private String domainId; + + /** + * Azure resource name. + */ + @JsonProperty(value = "properties.azureResourceName") + private String azureResourceName; + + /** + * Azure resource type. Possible values include: 'Website', + * 'TrafficManager'. + */ + @JsonProperty(value = "properties.azureResourceType") + private AzureResourceType azureResourceType; + + /** + * Custom DNS record type. Possible values include: 'CName', 'A'. + */ + @JsonProperty(value = "properties.customHostNameDnsRecordType") + private CustomHostNameDnsRecordType customHostNameDnsRecordType; + + /** + * Hostname type. Possible values include: 'Verified', 'Managed'. + */ + @JsonProperty(value = "properties.hostNameType") + private HostNameType hostNameType; + + /** + * SSL type. Possible values include: 'Disabled', 'SniEnabled', + * 'IpBasedEnabled'. + */ + @JsonProperty(value = "properties.sslState") + private SslState sslState; + + /** + * SSL certificate thumbprint. + */ + @JsonProperty(value = "properties.thumbprint") + private String thumbprint; + + /** + * Virtual IP address assigned to the hostname if IP based SSL is enabled. + */ + @JsonProperty(value = "properties.virtualIP", access = JsonProperty.Access.WRITE_ONLY) + private String virtualIP; + + /** + * Get the siteName value. + * + * @return the siteName value + */ + public String siteName() { + return this.siteName; + } + + /** + * Set the siteName value. + * + * @param siteName the siteName value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withSiteName(String siteName) { + this.siteName = siteName; + return this; + } + + /** + * Get the domainId value. + * + * @return the domainId value + */ + public String domainId() { + return this.domainId; + } + + /** + * Set the domainId value. + * + * @param domainId the domainId value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withDomainId(String domainId) { + this.domainId = domainId; + return this; + } + + /** + * Get the azureResourceName value. + * + * @return the azureResourceName value + */ + public String azureResourceName() { + return this.azureResourceName; + } + + /** + * Set the azureResourceName value. + * + * @param azureResourceName the azureResourceName value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withAzureResourceName(String azureResourceName) { + this.azureResourceName = azureResourceName; + return this; + } + + /** + * Get the azureResourceType value. + * + * @return the azureResourceType value + */ + public AzureResourceType azureResourceType() { + return this.azureResourceType; + } + + /** + * Set the azureResourceType value. + * + * @param azureResourceType the azureResourceType value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withAzureResourceType(AzureResourceType azureResourceType) { + this.azureResourceType = azureResourceType; + return this; + } + + /** + * Get the customHostNameDnsRecordType value. + * + * @return the customHostNameDnsRecordType value + */ + public CustomHostNameDnsRecordType customHostNameDnsRecordType() { + return this.customHostNameDnsRecordType; + } + + /** + * Set the customHostNameDnsRecordType value. + * + * @param customHostNameDnsRecordType the customHostNameDnsRecordType value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withCustomHostNameDnsRecordType(CustomHostNameDnsRecordType customHostNameDnsRecordType) { + this.customHostNameDnsRecordType = customHostNameDnsRecordType; + return this; + } + + /** + * Get the hostNameType value. + * + * @return the hostNameType value + */ + public HostNameType hostNameType() { + return this.hostNameType; + } + + /** + * Set the hostNameType value. + * + * @param hostNameType the hostNameType value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withHostNameType(HostNameType hostNameType) { + this.hostNameType = hostNameType; + return this; + } + + /** + * Get the sslState value. + * + * @return the sslState value + */ + public SslState sslState() { + return this.sslState; + } + + /** + * Set the sslState value. + * + * @param sslState the sslState value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withSslState(SslState sslState) { + this.sslState = sslState; + return this; + } + + /** + * Get the thumbprint value. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set the thumbprint value. + * + * @param thumbprint the thumbprint value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Get the virtualIP value. + * + * @return the virtualIP value + */ + public String virtualIP() { + return this.virtualIP; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HostingEnvironmentDiagnosticsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HostingEnvironmentDiagnosticsInner.java new file mode 100644 index 00000000000..97441d75bee --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HostingEnvironmentDiagnosticsInner.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Diagnostics for an App Service Environment. + */ +public class HostingEnvironmentDiagnosticsInner { + /** + * Name/identifier of the diagnostics. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Diagnostics output. + */ + @JsonProperty(value = "diagnosicsOutput") + private String diagnosicsOutput; + + /** + * 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 HostingEnvironmentDiagnosticsInner object itself. + */ + public HostingEnvironmentDiagnosticsInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the diagnosicsOutput value. + * + * @return the diagnosicsOutput value + */ + public String diagnosicsOutput() { + return this.diagnosicsOutput; + } + + /** + * Set the diagnosicsOutput value. + * + * @param diagnosicsOutput the diagnosicsOutput value to set + * @return the HostingEnvironmentDiagnosticsInner object itself. + */ + public HostingEnvironmentDiagnosticsInner withDiagnosicsOutput(String diagnosicsOutput) { + this.diagnosicsOutput = diagnosicsOutput; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HybridConnectionInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HybridConnectionInner.java new file mode 100644 index 00000000000..3c177f584bd --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HybridConnectionInner.java @@ -0,0 +1,232 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Hybrid Connection contract. This is used to configure a Hybrid Connection. + */ +@JsonFlatten +public class HybridConnectionInner extends ProxyOnlyResource { + /** + * 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; + + /** + * The suffix for the service bus endpoint. By default this is + * .servicebus.windows.net. + */ + @JsonProperty(value = "properties.serviceBusSuffix") + private String serviceBusSuffix; + + /** + * 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; + } + + /** + * Get the serviceBusSuffix value. + * + * @return the serviceBusSuffix value + */ + public String serviceBusSuffix() { + return this.serviceBusSuffix; + } + + /** + * Set the serviceBusSuffix value. + * + * @param serviceBusSuffix the serviceBusSuffix value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withServiceBusSuffix(String serviceBusSuffix) { + this.serviceBusSuffix = serviceBusSuffix; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HybridConnectionKeyInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HybridConnectionKeyInner.java new file mode 100644 index 00000000000..50195416caa --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HybridConnectionKeyInner.java @@ -0,0 +1,51 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Hybrid Connection key contract. This has the send key name and value for a + * Hybrid Connection. + */ +@JsonFlatten +public class HybridConnectionKeyInner extends ProxyOnlyResource { + /** + * The name of the send key. + */ + @JsonProperty(value = "properties.sendKeyName", access = JsonProperty.Access.WRITE_ONLY) + private String sendKeyName; + + /** + * The value of the send key. + */ + @JsonProperty(value = "properties.sendKeyValue", access = JsonProperty.Access.WRITE_ONLY) + private String sendKeyValue; + + /** + * Get the sendKeyName value. + * + * @return the sendKeyName value + */ + public String sendKeyName() { + return this.sendKeyName; + } + + /** + * Get the sendKeyValue value. + * + * @return the sendKeyValue value + */ + public String sendKeyValue() { + return this.sendKeyValue; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HybridConnectionLimitsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HybridConnectionLimitsInner.java new file mode 100644 index 00000000000..27ddeb361e3 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/HybridConnectionLimitsInner.java @@ -0,0 +1,51 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Hybrid Connection limits contract. This is used to return the plan limits of + * Hybrid Connections. + */ +@JsonFlatten +public class HybridConnectionLimitsInner extends ProxyOnlyResource { + /** + * The current number of Hybrid Connections. + */ + @JsonProperty(value = "properties.current", access = JsonProperty.Access.WRITE_ONLY) + private Integer current; + + /** + * The maximum number of Hybrid Connections allowed. + */ + @JsonProperty(value = "properties.maximum", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximum; + + /** + * Get the current value. + * + * @return the current value + */ + public Integer current() { + return this.current; + } + + /** + * Get the maximum value. + * + * @return the maximum value + */ + public Integer maximum() { + return this.maximum; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/IdentifierInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/IdentifierInner.java new file mode 100644 index 00000000000..752db094a99 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/IdentifierInner.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * A domain specific resource identifier. + */ +@JsonFlatten +public class IdentifierInner extends ProxyOnlyResource { + /** + * String representation of the identity. + */ + @JsonProperty(value = "properties.id") + private String identifierId; + + /** + * Get the identifierId value. + * + * @return the identifierId value + */ + public String identifierId() { + return this.identifierId; + } + + /** + * Set the identifierId value. + * + * @param identifierId the identifierId value to set + * @return the IdentifierInner object itself. + */ + public IdentifierInner withIdentifierId(String identifierId) { + this.identifierId = identifierId; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MSDeployInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MSDeployInner.java new file mode 100644 index 00000000000..604ba27bffd --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MSDeployInner.java @@ -0,0 +1,210 @@ +/** + * 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.web.implementation; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * MSDeploy ARM PUT information. + */ +@JsonFlatten +public class MSDeployInner extends ProxyOnlyResource { + /** + * Package URI. + */ + @JsonProperty(value = "properties.packageUri") + private String packageUri; + + /** + * SQL Connection String. + */ + @JsonProperty(value = "properties.connectionString") + private String connectionString; + + /** + * Database Type. + */ + @JsonProperty(value = "properties.dbType") + private String dbType; + + /** + * URI of MSDeploy Parameters file. Must not be set if SetParameters is + * used. + */ + @JsonProperty(value = "properties.setParametersXmlFileUri") + private String setParametersXmlFileUri; + + /** + * MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + */ + @JsonProperty(value = "properties.setParameters") + private Map setParameters; + + /** + * Controls whether the MSDeploy operation skips the App_Data directory. + * If set to <code>true</code>, the existing App_Data directory + * on the destination + * will not be deleted, and any App_Data directory in the source will be + * ignored. + * Setting is <code>false</code> by default. + */ + @JsonProperty(value = "properties.skipAppData") + private Boolean skipAppData; + + /** + * Sets the AppOffline rule while the MSDeploy operation executes. + * Setting is <code>false</code> by default. + */ + @JsonProperty(value = "properties.appOffline") + private Boolean appOffline; + + /** + * Get the packageUri value. + * + * @return the packageUri value + */ + public String packageUri() { + return this.packageUri; + } + + /** + * Set the packageUri value. + * + * @param packageUri the packageUri value to set + * @return the MSDeployInner object itself. + */ + public MSDeployInner withPackageUri(String packageUri) { + this.packageUri = packageUri; + 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 MSDeployInner object itself. + */ + public MSDeployInner withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Get the dbType value. + * + * @return the dbType value + */ + public String dbType() { + return this.dbType; + } + + /** + * Set the dbType value. + * + * @param dbType the dbType value to set + * @return the MSDeployInner object itself. + */ + public MSDeployInner withDbType(String dbType) { + this.dbType = dbType; + return this; + } + + /** + * Get the setParametersXmlFileUri value. + * + * @return the setParametersXmlFileUri value + */ + public String setParametersXmlFileUri() { + return this.setParametersXmlFileUri; + } + + /** + * Set the setParametersXmlFileUri value. + * + * @param setParametersXmlFileUri the setParametersXmlFileUri value to set + * @return the MSDeployInner object itself. + */ + public MSDeployInner withSetParametersXmlFileUri(String setParametersXmlFileUri) { + this.setParametersXmlFileUri = setParametersXmlFileUri; + return this; + } + + /** + * Get the setParameters value. + * + * @return the setParameters value + */ + public Map setParameters() { + return this.setParameters; + } + + /** + * Set the setParameters value. + * + * @param setParameters the setParameters value to set + * @return the MSDeployInner object itself. + */ + public MSDeployInner withSetParameters(Map setParameters) { + this.setParameters = setParameters; + return this; + } + + /** + * Get the skipAppData value. + * + * @return the skipAppData value + */ + public Boolean skipAppData() { + return this.skipAppData; + } + + /** + * Set the skipAppData value. + * + * @param skipAppData the skipAppData value to set + * @return the MSDeployInner object itself. + */ + public MSDeployInner withSkipAppData(Boolean skipAppData) { + this.skipAppData = skipAppData; + return this; + } + + /** + * Get the appOffline value. + * + * @return the appOffline value + */ + public Boolean appOffline() { + return this.appOffline; + } + + /** + * Set the appOffline value. + * + * @param appOffline the appOffline value to set + * @return the MSDeployInner object itself. + */ + public MSDeployInner withAppOffline(Boolean appOffline) { + this.appOffline = appOffline; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MSDeployLogInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MSDeployLogInner.java new file mode 100644 index 00000000000..d04fc71adca --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MSDeployLogInner.java @@ -0,0 +1,37 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.microsoft.azure.management.web.MSDeployLogEntry; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * MSDeploy log. + */ +@JsonFlatten +public class MSDeployLogInner extends ProxyOnlyResource { + /** + * List of log entry messages. + */ + @JsonProperty(value = "properties.entries", access = JsonProperty.Access.WRITE_ONLY) + private List entries; + + /** + * Get the entries value. + * + * @return the entries value + */ + public List entries() { + return this.entries; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MSDeployStatusInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MSDeployStatusInner.java new file mode 100644 index 00000000000..45f8fd32f27 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MSDeployStatusInner.java @@ -0,0 +1,98 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.MSDeployProvisioningState; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * MSDeploy ARM response. + */ +@JsonFlatten +public class MSDeployStatusInner extends ProxyOnlyResource { + /** + * Username of deployer. + */ + @JsonProperty(value = "properties.deployer", access = JsonProperty.Access.WRITE_ONLY) + private String deployer; + + /** + * Provisioning state. Possible values include: 'accepted', 'running', + * 'succeeded', 'failed', 'canceled'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private MSDeployProvisioningState provisioningState; + + /** + * Start time of deploy operation. + */ + @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startTime; + + /** + * End time of deploy operation. + */ + @JsonProperty(value = "properties.endTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endTime; + + /** + * Whether the deployment operation has completed. + */ + @JsonProperty(value = "properties.complete", access = JsonProperty.Access.WRITE_ONLY) + private Boolean complete; + + /** + * Get the deployer value. + * + * @return the deployer value + */ + public String deployer() { + return this.deployer; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public MSDeployProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the startTime value. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime value. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Get the complete value. + * + * @return the complete value + */ + public Boolean complete() { + return this.complete; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MetricDefinitionInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MetricDefinitionInner.java new file mode 100644 index 00000000000..4d768ba9935 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MetricDefinitionInner.java @@ -0,0 +1,98 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.microsoft.azure.management.web.MetricAvailabilily; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Metadata for a metric. + */ +@JsonFlatten +public class MetricDefinitionInner extends ProxyOnlyResource { + /** + * Name of the metric. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private String metricDefinitionName; + + /** + * Unit of the metric. + */ + @JsonProperty(value = "properties.unit", access = JsonProperty.Access.WRITE_ONLY) + private String unit; + + /** + * Primary aggregation type. + */ + @JsonProperty(value = "properties.primaryAggregationType", access = JsonProperty.Access.WRITE_ONLY) + private String primaryAggregationType; + + /** + * List of time grains supported for the metric together with retention + * period. + */ + @JsonProperty(value = "properties.metricAvailabilities", access = JsonProperty.Access.WRITE_ONLY) + private List metricAvailabilities; + + /** + * Friendly name shown in the UI. + */ + @JsonProperty(value = "properties.displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /** + * Get the metricDefinitionName value. + * + * @return the metricDefinitionName value + */ + public String metricDefinitionName() { + return this.metricDefinitionName; + } + + /** + * Get the unit value. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Get the primaryAggregationType value. + * + * @return the primaryAggregationType value + */ + public String primaryAggregationType() { + return this.primaryAggregationType; + } + + /** + * Get the metricAvailabilities value. + * + * @return the metricAvailabilities value + */ + public List metricAvailabilities() { + return this.metricAvailabilities; + } + + /** + * Get the displayName value. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MigrateMySqlRequestInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MigrateMySqlRequestInner.java new file mode 100644 index 00000000000..6e5151eb0c3 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MigrateMySqlRequestInner.java @@ -0,0 +1,74 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.MySqlMigrationType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * MySQL migration request. + */ +@JsonFlatten +public class MigrateMySqlRequestInner extends ProxyOnlyResource { + /** + * Connection string to the remote MySQL database. + */ + @JsonProperty(value = "properties.connectionString", required = true) + private String connectionString; + + /** + * The type of migration operation to be done. Possible values include: + * 'LocalToRemote', 'RemoteToLocal'. + */ + @JsonProperty(value = "properties.migrationType", required = true) + private MySqlMigrationType migrationType; + + /** + * 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; + } + + /** + * Get the migrationType value. + * + * @return the migrationType value + */ + public MySqlMigrationType migrationType() { + return this.migrationType; + } + + /** + * Set the migrationType value. + * + * @param migrationType the migrationType value to set + * @return the MigrateMySqlRequestInner object itself. + */ + public MigrateMySqlRequestInner withMigrationType(MySqlMigrationType migrationType) { + this.migrationType = migrationType; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MigrateMySqlStatusInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MigrateMySqlStatusInner.java new file mode 100644 index 00000000000..306f6101d66 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/MigrateMySqlStatusInner.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.web.implementation; + +import com.microsoft.azure.management.web.OperationStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * MySQL migration status. + */ +@JsonFlatten +public class MigrateMySqlStatusInner extends ProxyOnlyResource { + /** + * Status of the migration task. Possible values include: 'InProgress', + * 'Failed', 'Succeeded', 'TimedOut', 'Created'. + */ + @JsonProperty(value = "properties.migrationOperationStatus", access = JsonProperty.Access.WRITE_ONLY) + private OperationStatus migrationOperationStatus; + + /** + * Operation ID for the migration task. + */ + @JsonProperty(value = "properties.operationId", access = JsonProperty.Access.WRITE_ONLY) + private String operationId; + + /** + * True if the web app has in app MySql enabled. + */ + @JsonProperty(value = "properties.localMySqlEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean localMySqlEnabled; + + /** + * Get the migrationOperationStatus value. + * + * @return the migrationOperationStatus value + */ + public OperationStatus migrationOperationStatus() { + return this.migrationOperationStatus; + } + + /** + * Get the operationId value. + * + * @return the operationId value + */ + public String operationId() { + return this.operationId; + } + + /** + * Get the localMySqlEnabled value. + * + * @return the localMySqlEnabled value + */ + public Boolean localMySqlEnabled() { + return this.localMySqlEnabled; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/NameIdentifierInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/NameIdentifierInner.java new file mode 100644 index 00000000000..76b66544bb4 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/NameIdentifierInner.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Identifies an object. + */ +public class NameIdentifierInner { + /** + * Name of the object. + */ + @JsonProperty(value = "name") + 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 NameIdentifierInner object itself. + */ + public NameIdentifierInner withName(String name) { + this.name = name; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/NetworkFeaturesInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/NetworkFeaturesInner.java new file mode 100644 index 00000000000..ded0376c930 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/NetworkFeaturesInner.java @@ -0,0 +1,82 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Full view of network features for an app (presently VNET integration and + * Hybrid Connections). + */ +@JsonFlatten +public class NetworkFeaturesInner extends ProxyOnlyResource { + /** + * The Virtual Network name. + */ + @JsonProperty(value = "properties.virtualNetworkName", access = JsonProperty.Access.WRITE_ONLY) + private String virtualNetworkName; + + /** + * The Virtual Network summary view. + */ + @JsonProperty(value = "properties.virtualNetworkConnection", access = JsonProperty.Access.WRITE_ONLY) + private VnetInfoInner virtualNetworkConnection; + + /** + * The Hybrid Connections summary view. + */ + @JsonProperty(value = "properties.hybridConnections", access = JsonProperty.Access.WRITE_ONLY) + private List hybridConnections; + + /** + * The Hybrid Connection V2 (Service Bus) view. + */ + @JsonProperty(value = "properties.hybridConnectionsV2", access = JsonProperty.Access.WRITE_ONLY) + private List hybridConnectionsV2; + + /** + * Get the virtualNetworkName value. + * + * @return the virtualNetworkName value + */ + public String virtualNetworkName() { + return this.virtualNetworkName; + } + + /** + * Get the virtualNetworkConnection value. + * + * @return the virtualNetworkConnection value + */ + public VnetInfoInner virtualNetworkConnection() { + return this.virtualNetworkConnection; + } + + /** + * Get the hybridConnections value. + * + * @return the hybridConnections value + */ + public List hybridConnections() { + return this.hybridConnections; + } + + /** + * Get the hybridConnectionsV2 value. + * + * @return the hybridConnectionsV2 value + */ + public List hybridConnectionsV2() { + return this.hybridConnectionsV2; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/OperationInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/OperationInner.java new file mode 100644 index 00000000000..12a17dccd3c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/OperationInner.java @@ -0,0 +1,231 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.OperationStatus; +import java.util.List; +import com.microsoft.azure.management.web.ErrorEntity; +import org.joda.time.DateTime; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An operation on a resource. + */ +public class OperationInner { + /** + * Operation ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Operation name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The current status of the operation. Possible values include: + * 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created'. + */ + @JsonProperty(value = "status") + private OperationStatus status; + + /** + * Any errors associate with the operation. + */ + @JsonProperty(value = "errors") + private List errors; + + /** + * Time when operation has started. + */ + @JsonProperty(value = "createdTime") + private DateTime createdTime; + + /** + * Time when operation has been updated. + */ + @JsonProperty(value = "modifiedTime") + private DateTime modifiedTime; + + /** + * Time when operation will expire. + */ + @JsonProperty(value = "expirationTime") + private DateTime expirationTime; + + /** + * Applicable only for stamp operation ids. + */ + @JsonProperty(value = "geoMasterOperationId") + private UUID 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 UUID geoMasterOperationId() { + return this.geoMasterOperationId; + } + + /** + * Set the geoMasterOperationId value. + * + * @param geoMasterOperationId the geoMasterOperationId value to set + * @return the OperationInner object itself. + */ + public OperationInner withGeoMasterOperationId(UUID geoMasterOperationId) { + this.geoMasterOperationId = geoMasterOperationId; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PageImpl.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PageImpl.java new file mode 100644 index 00000000000..c3575ccacb2 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PerfMonResponseInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PerfMonResponseInner.java new file mode 100644 index 00000000000..fe5d011217c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PerfMonResponseInner.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.microsoft.azure.management.web.PerfMonSet; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Performance monitor API response. + */ +public class PerfMonResponseInner { + /** + * The response code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * The message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The performance monitor counters. + */ + @JsonProperty(value = "data") + 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-web/src/main/java/com/microsoft/azure/management/web/implementation/PremierAddOnInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PremierAddOnInner.java new file mode 100644 index 00000000000..d25f8a27ffd --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PremierAddOnInner.java @@ -0,0 +1,229 @@ +/** + * 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.web.implementation; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Premier add-on. + */ +@JsonFlatten +public class PremierAddOnInner extends Resource { + /** + * Premier add on SKU. + */ + @JsonProperty(value = "properties.sku") + private String sku; + + /** + * Premier add on Product. + */ + @JsonProperty(value = "properties.product") + private String product; + + /** + * Premier add on Vendor. + */ + @JsonProperty(value = "properties.vendor") + private String vendor; + + /** + * Premier add on Name. + */ + @JsonProperty(value = "properties.name") + private String premierAddOnName; + + /** + * Premier add on Location. + */ + @JsonProperty(value = "properties.location") + private String premierAddOnLocation; + + /** + * Premier add on Tags. + */ + @JsonProperty(value = "properties.tags") + private Map premierAddOnTags; + + /** + * Premier add on Marketplace publisher. + */ + @JsonProperty(value = "properties.marketplacePublisher") + private String marketplacePublisher; + + /** + * Premier add on Marketplace offer. + */ + @JsonProperty(value = "properties.marketplaceOffer") + private String marketplaceOffer; + + /** + * Get the sku value. + * + * @return the sku value + */ + public String sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get the product value. + * + * @return the product value + */ + public String product() { + return this.product; + } + + /** + * Set the product value. + * + * @param product the product value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the vendor value. + * + * @return the vendor value + */ + public String vendor() { + return this.vendor; + } + + /** + * Set the vendor value. + * + * @param vendor the vendor value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get the premierAddOnName value. + * + * @return the premierAddOnName value + */ + public String premierAddOnName() { + return this.premierAddOnName; + } + + /** + * Set the premierAddOnName value. + * + * @param premierAddOnName the premierAddOnName value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withPremierAddOnName(String premierAddOnName) { + this.premierAddOnName = premierAddOnName; + return this; + } + + /** + * Get the premierAddOnLocation value. + * + * @return the premierAddOnLocation value + */ + public String premierAddOnLocation() { + return this.premierAddOnLocation; + } + + /** + * Set the premierAddOnLocation value. + * + * @param premierAddOnLocation the premierAddOnLocation value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withPremierAddOnLocation(String premierAddOnLocation) { + this.premierAddOnLocation = premierAddOnLocation; + return this; + } + + /** + * Get the premierAddOnTags value. + * + * @return the premierAddOnTags value + */ + public Map premierAddOnTags() { + return this.premierAddOnTags; + } + + /** + * Set the premierAddOnTags value. + * + * @param premierAddOnTags the premierAddOnTags value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withPremierAddOnTags(Map premierAddOnTags) { + this.premierAddOnTags = premierAddOnTags; + return this; + } + + /** + * Get the marketplacePublisher value. + * + * @return the marketplacePublisher value + */ + public String marketplacePublisher() { + return this.marketplacePublisher; + } + + /** + * Set the marketplacePublisher value. + * + * @param marketplacePublisher the marketplacePublisher value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withMarketplacePublisher(String marketplacePublisher) { + this.marketplacePublisher = marketplacePublisher; + return this; + } + + /** + * Get the marketplaceOffer value. + * + * @return the marketplaceOffer value + */ + public String marketplaceOffer() { + return this.marketplaceOffer; + } + + /** + * Set the marketplaceOffer value. + * + * @param marketplaceOffer the marketplaceOffer value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withMarketplaceOffer(String marketplaceOffer) { + this.marketplaceOffer = marketplaceOffer; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PremierAddOnOfferInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PremierAddOnOfferInner.java new file mode 100644 index 00000000000..af9f33cec73 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PremierAddOnOfferInner.java @@ -0,0 +1,309 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.AppServicePlanRestrictions; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Premier add-on offer. + */ +@JsonFlatten +public class PremierAddOnOfferInner extends ProxyOnlyResource { + /** + * Premier add on SKU. + */ + @JsonProperty(value = "properties.sku") + private String sku; + + /** + * Premier add on offer Product. + */ + @JsonProperty(value = "properties.product") + private String product; + + /** + * Premier add on offer Vendor. + */ + @JsonProperty(value = "properties.vendor") + private String vendor; + + /** + * Premier add on offer Name. + */ + @JsonProperty(value = "properties.name") + private String premierAddOnOfferName; + + /** + * <code>true</code> if promotion code is required; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.promoCodeRequired") + private Boolean promoCodeRequired; + + /** + * Premier add on offer Quota. + */ + @JsonProperty(value = "properties.quota") + private Integer quota; + + /** + * App Service plans this offer is restricted to. Possible values include: + * 'None', 'Free', 'Shared', 'Basic', 'Standard', 'Premium'. + */ + @JsonProperty(value = "properties.webHostingPlanRestrictions") + private AppServicePlanRestrictions webHostingPlanRestrictions; + + /** + * Privacy policy URL. + */ + @JsonProperty(value = "properties.privacyPolicyUrl") + private String privacyPolicyUrl; + + /** + * Legal terms URL. + */ + @JsonProperty(value = "properties.legalTermsUrl") + private String legalTermsUrl; + + /** + * Marketplace publisher. + */ + @JsonProperty(value = "properties.marketplacePublisher") + private String marketplacePublisher; + + /** + * Marketplace offer. + */ + @JsonProperty(value = "properties.marketplaceOffer") + private String marketplaceOffer; + + /** + * Get the sku value. + * + * @return the sku value + */ + public String sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get the product value. + * + * @return the product value + */ + public String product() { + return this.product; + } + + /** + * Set the product value. + * + * @param product the product value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the vendor value. + * + * @return the vendor value + */ + public String vendor() { + return this.vendor; + } + + /** + * Set the vendor value. + * + * @param vendor the vendor value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get the premierAddOnOfferName value. + * + * @return the premierAddOnOfferName value + */ + public String premierAddOnOfferName() { + return this.premierAddOnOfferName; + } + + /** + * Set the premierAddOnOfferName value. + * + * @param premierAddOnOfferName the premierAddOnOfferName value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withPremierAddOnOfferName(String premierAddOnOfferName) { + this.premierAddOnOfferName = premierAddOnOfferName; + return this; + } + + /** + * Get the promoCodeRequired value. + * + * @return the promoCodeRequired value + */ + public Boolean promoCodeRequired() { + return this.promoCodeRequired; + } + + /** + * Set the promoCodeRequired value. + * + * @param promoCodeRequired the promoCodeRequired value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withPromoCodeRequired(Boolean promoCodeRequired) { + this.promoCodeRequired = promoCodeRequired; + return this; + } + + /** + * Get the quota value. + * + * @return the quota value + */ + public Integer quota() { + return this.quota; + } + + /** + * Set the quota value. + * + * @param quota the quota value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withQuota(Integer quota) { + this.quota = quota; + return this; + } + + /** + * Get the webHostingPlanRestrictions value. + * + * @return the webHostingPlanRestrictions value + */ + public AppServicePlanRestrictions webHostingPlanRestrictions() { + return this.webHostingPlanRestrictions; + } + + /** + * Set the webHostingPlanRestrictions value. + * + * @param webHostingPlanRestrictions the webHostingPlanRestrictions value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withWebHostingPlanRestrictions(AppServicePlanRestrictions webHostingPlanRestrictions) { + this.webHostingPlanRestrictions = webHostingPlanRestrictions; + return this; + } + + /** + * Get the privacyPolicyUrl value. + * + * @return the privacyPolicyUrl value + */ + public String privacyPolicyUrl() { + return this.privacyPolicyUrl; + } + + /** + * Set the privacyPolicyUrl value. + * + * @param privacyPolicyUrl the privacyPolicyUrl value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withPrivacyPolicyUrl(String privacyPolicyUrl) { + this.privacyPolicyUrl = privacyPolicyUrl; + return this; + } + + /** + * Get the legalTermsUrl value. + * + * @return the legalTermsUrl value + */ + public String legalTermsUrl() { + return this.legalTermsUrl; + } + + /** + * Set the legalTermsUrl value. + * + * @param legalTermsUrl the legalTermsUrl value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withLegalTermsUrl(String legalTermsUrl) { + this.legalTermsUrl = legalTermsUrl; + return this; + } + + /** + * Get the marketplacePublisher value. + * + * @return the marketplacePublisher value + */ + public String marketplacePublisher() { + return this.marketplacePublisher; + } + + /** + * Set the marketplacePublisher value. + * + * @param marketplacePublisher the marketplacePublisher value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withMarketplacePublisher(String marketplacePublisher) { + this.marketplacePublisher = marketplacePublisher; + return this; + } + + /** + * Get the marketplaceOffer value. + * + * @return the marketplaceOffer value + */ + public String marketplaceOffer() { + return this.marketplaceOffer; + } + + /** + * Set the marketplaceOffer value. + * + * @param marketplaceOffer the marketplaceOffer value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withMarketplaceOffer(String marketplaceOffer) { + this.marketplaceOffer = marketplaceOffer; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProcessInfoInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProcessInfoInner.java new file mode 100644 index 00000000000..8a1b5c347e0 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProcessInfoInner.java @@ -0,0 +1,959 @@ +/** + * 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.web.implementation; + +import java.util.List; +import org.joda.time.DateTime; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Process Information. + */ +@JsonFlatten +public class ProcessInfoInner extends ProxyOnlyResource { + /** + * ARM Identifier for deployment. + */ + @JsonProperty(value = "properties.id") + private Integer processInfoId; + + /** + * Deployment name. + */ + @JsonProperty(value = "properties.name") + private String processInfoName; + + /** + * HRef URI. + */ + @JsonProperty(value = "properties.href") + private String href; + + /** + * Minidump URI. + */ + @JsonProperty(value = "properties.miniDump") + private String miniDump; + + /** + * Is profile running?. + */ + @JsonProperty(value = "properties.isProfileRunning") + private Boolean isProfileRunning; + + /** + * Is the IIS Profile running?. + */ + @JsonProperty(value = "properties.isIisProfileRunning") + private Boolean isIisProfileRunning; + + /** + * IIS Profile timeout (seconds). + */ + @JsonProperty(value = "properties.iisProfileTimeoutInSeconds") + private Double iisProfileTimeoutInSeconds; + + /** + * Parent process. + */ + @JsonProperty(value = "properties.parent") + private String parent; + + /** + * Child process list. + */ + @JsonProperty(value = "properties.children") + private List children; + + /** + * Thread list. + */ + @JsonProperty(value = "properties.threads") + private List threads; + + /** + * List of open files. + */ + @JsonProperty(value = "properties.openFileHandles") + private List openFileHandles; + + /** + * List of modules. + */ + @JsonProperty(value = "properties.modules") + private List modules; + + /** + * File name of this process. + */ + @JsonProperty(value = "properties.fileName") + private String fileName; + + /** + * Command line. + */ + @JsonProperty(value = "properties.commandLine") + private String commandLine; + + /** + * User name. + */ + @JsonProperty(value = "properties.userName") + private String userName; + + /** + * Handle count. + */ + @JsonProperty(value = "properties.handleCount") + private Integer handleCount; + + /** + * Module count. + */ + @JsonProperty(value = "properties.moduleCount") + private Integer moduleCount; + + /** + * Thread count. + */ + @JsonProperty(value = "properties.threadCount") + private Integer threadCount; + + /** + * Start time. + */ + @JsonProperty(value = "properties.startTime") + private DateTime startTime; + + /** + * Total CPU time. + */ + @JsonProperty(value = "properties.totalProcessorTime") + private String totalProcessorTime; + + /** + * User CPU time. + */ + @JsonProperty(value = "properties.userProcessorTime") + private String userProcessorTime; + + /** + * Privileged CPU time. + */ + @JsonProperty(value = "properties.privilegedProcessorTime") + private String privilegedProcessorTime; + + /** + * Working set. + */ + @JsonProperty(value = "properties.workingSet64") + private Long workingSet64; + + /** + * Peak working set. + */ + @JsonProperty(value = "properties.peakWorkingSet64") + private Long peakWorkingSet64; + + /** + * Private memory size. + */ + @JsonProperty(value = "properties.privateMemorySize64") + private Long privateMemorySize64; + + /** + * Virtual memory size. + */ + @JsonProperty(value = "properties.virtualMemorySize64") + private Long virtualMemorySize64; + + /** + * Peak virtual memory usage. + */ + @JsonProperty(value = "properties.peakVirtualMemorySize64") + private Long peakVirtualMemorySize64; + + /** + * Paged system memory. + */ + @JsonProperty(value = "properties.pagedSystemMemorySize64") + private Long pagedSystemMemorySize64; + + /** + * Non-paged system memory. + */ + @JsonProperty(value = "properties.nonpagedSystemMemorySize64") + private Long nonpagedSystemMemorySize64; + + /** + * Paged memory. + */ + @JsonProperty(value = "properties.pagedMemorySize64") + private Long pagedMemorySize64; + + /** + * Peak paged memory. + */ + @JsonProperty(value = "properties.peakPagedMemorySize64") + private Long peakPagedMemorySize64; + + /** + * Time stamp. + */ + @JsonProperty(value = "properties.timeStamp") + private DateTime timeStamp; + + /** + * List of environment variables. + */ + @JsonProperty(value = "properties.environmentVariables") + private Map environmentVariables; + + /** + * Is this the SCM site?. + */ + @JsonProperty(value = "properties.isScmSite") + private Boolean isScmSite; + + /** + * Is this a Web Job?. + */ + @JsonProperty(value = "properties.isWebJob") + private Boolean isWebJob; + + /** + * Description of process. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * Get the processInfoId value. + * + * @return the processInfoId value + */ + public Integer processInfoId() { + return this.processInfoId; + } + + /** + * Set the processInfoId value. + * + * @param processInfoId the processInfoId value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withProcessInfoId(Integer processInfoId) { + this.processInfoId = processInfoId; + return this; + } + + /** + * Get the processInfoName value. + * + * @return the processInfoName value + */ + public String processInfoName() { + return this.processInfoName; + } + + /** + * Set the processInfoName value. + * + * @param processInfoName the processInfoName value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withProcessInfoName(String processInfoName) { + this.processInfoName = processInfoName; + return this; + } + + /** + * Get the href value. + * + * @return the href value + */ + public String href() { + return this.href; + } + + /** + * Set the href value. + * + * @param href the href value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withHref(String href) { + this.href = href; + return this; + } + + /** + * Get the miniDump value. + * + * @return the miniDump value + */ + public String miniDump() { + return this.miniDump; + } + + /** + * Set the miniDump value. + * + * @param miniDump the miniDump value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withMiniDump(String miniDump) { + this.miniDump = miniDump; + return this; + } + + /** + * Get the isProfileRunning value. + * + * @return the isProfileRunning value + */ + public Boolean isProfileRunning() { + return this.isProfileRunning; + } + + /** + * Set the isProfileRunning value. + * + * @param isProfileRunning the isProfileRunning value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsProfileRunning(Boolean isProfileRunning) { + this.isProfileRunning = isProfileRunning; + return this; + } + + /** + * Get the isIisProfileRunning value. + * + * @return the isIisProfileRunning value + */ + public Boolean isIisProfileRunning() { + return this.isIisProfileRunning; + } + + /** + * Set the isIisProfileRunning value. + * + * @param isIisProfileRunning the isIisProfileRunning value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsIisProfileRunning(Boolean isIisProfileRunning) { + this.isIisProfileRunning = isIisProfileRunning; + return this; + } + + /** + * Get the iisProfileTimeoutInSeconds value. + * + * @return the iisProfileTimeoutInSeconds value + */ + public Double iisProfileTimeoutInSeconds() { + return this.iisProfileTimeoutInSeconds; + } + + /** + * Set the iisProfileTimeoutInSeconds value. + * + * @param iisProfileTimeoutInSeconds the iisProfileTimeoutInSeconds value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIisProfileTimeoutInSeconds(Double iisProfileTimeoutInSeconds) { + this.iisProfileTimeoutInSeconds = iisProfileTimeoutInSeconds; + return this; + } + + /** + * Get the parent value. + * + * @return the parent value + */ + public String parent() { + return this.parent; + } + + /** + * Set the parent value. + * + * @param parent the parent value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withParent(String parent) { + this.parent = parent; + return this; + } + + /** + * Get the children value. + * + * @return the children value + */ + public List children() { + return this.children; + } + + /** + * Set the children value. + * + * @param children the children value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withChildren(List children) { + this.children = children; + return this; + } + + /** + * Get the threads value. + * + * @return the threads value + */ + public List threads() { + return this.threads; + } + + /** + * Set the threads value. + * + * @param threads the threads value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withThreads(List threads) { + this.threads = threads; + return this; + } + + /** + * Get the openFileHandles value. + * + * @return the openFileHandles value + */ + public List openFileHandles() { + return this.openFileHandles; + } + + /** + * Set the openFileHandles value. + * + * @param openFileHandles the openFileHandles value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withOpenFileHandles(List openFileHandles) { + this.openFileHandles = openFileHandles; + return this; + } + + /** + * Get the modules value. + * + * @return the modules value + */ + public List modules() { + return this.modules; + } + + /** + * Set the modules value. + * + * @param modules the modules value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withModules(List modules) { + this.modules = modules; + return this; + } + + /** + * Get the fileName value. + * + * @return the fileName value + */ + public String fileName() { + return this.fileName; + } + + /** + * Set the fileName value. + * + * @param fileName the fileName value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get the commandLine value. + * + * @return the commandLine value + */ + public String commandLine() { + return this.commandLine; + } + + /** + * Set the commandLine value. + * + * @param commandLine the commandLine value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withCommandLine(String commandLine) { + this.commandLine = commandLine; + return this; + } + + /** + * Get the userName value. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Set the userName value. + * + * @param userName the userName value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get the handleCount value. + * + * @return the handleCount value + */ + public Integer handleCount() { + return this.handleCount; + } + + /** + * Set the handleCount value. + * + * @param handleCount the handleCount value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withHandleCount(Integer handleCount) { + this.handleCount = handleCount; + return this; + } + + /** + * Get the moduleCount value. + * + * @return the moduleCount value + */ + public Integer moduleCount() { + return this.moduleCount; + } + + /** + * Set the moduleCount value. + * + * @param moduleCount the moduleCount value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withModuleCount(Integer moduleCount) { + this.moduleCount = moduleCount; + return this; + } + + /** + * Get the threadCount value. + * + * @return the threadCount value + */ + public Integer threadCount() { + return this.threadCount; + } + + /** + * Set the threadCount value. + * + * @param threadCount the threadCount value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withThreadCount(Integer threadCount) { + this.threadCount = threadCount; + 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 ProcessInfoInner object itself. + */ + public ProcessInfoInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the totalProcessorTime value. + * + * @return the totalProcessorTime value + */ + public String totalProcessorTime() { + return this.totalProcessorTime; + } + + /** + * Set the totalProcessorTime value. + * + * @param totalProcessorTime the totalProcessorTime value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withTotalProcessorTime(String totalProcessorTime) { + this.totalProcessorTime = totalProcessorTime; + return this; + } + + /** + * Get the userProcessorTime value. + * + * @return the userProcessorTime value + */ + public String userProcessorTime() { + return this.userProcessorTime; + } + + /** + * Set the userProcessorTime value. + * + * @param userProcessorTime the userProcessorTime value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withUserProcessorTime(String userProcessorTime) { + this.userProcessorTime = userProcessorTime; + return this; + } + + /** + * Get the privilegedProcessorTime value. + * + * @return the privilegedProcessorTime value + */ + public String privilegedProcessorTime() { + return this.privilegedProcessorTime; + } + + /** + * Set the privilegedProcessorTime value. + * + * @param privilegedProcessorTime the privilegedProcessorTime value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPrivilegedProcessorTime(String privilegedProcessorTime) { + this.privilegedProcessorTime = privilegedProcessorTime; + return this; + } + + /** + * Get the workingSet64 value. + * + * @return the workingSet64 value + */ + public Long workingSet64() { + return this.workingSet64; + } + + /** + * Set the workingSet64 value. + * + * @param workingSet64 the workingSet64 value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withWorkingSet64(Long workingSet64) { + this.workingSet64 = workingSet64; + return this; + } + + /** + * Get the peakWorkingSet64 value. + * + * @return the peakWorkingSet64 value + */ + public Long peakWorkingSet64() { + return this.peakWorkingSet64; + } + + /** + * Set the peakWorkingSet64 value. + * + * @param peakWorkingSet64 the peakWorkingSet64 value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPeakWorkingSet64(Long peakWorkingSet64) { + this.peakWorkingSet64 = peakWorkingSet64; + return this; + } + + /** + * Get the privateMemorySize64 value. + * + * @return the privateMemorySize64 value + */ + public Long privateMemorySize64() { + return this.privateMemorySize64; + } + + /** + * Set the privateMemorySize64 value. + * + * @param privateMemorySize64 the privateMemorySize64 value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPrivateMemorySize64(Long privateMemorySize64) { + this.privateMemorySize64 = privateMemorySize64; + return this; + } + + /** + * Get the virtualMemorySize64 value. + * + * @return the virtualMemorySize64 value + */ + public Long virtualMemorySize64() { + return this.virtualMemorySize64; + } + + /** + * Set the virtualMemorySize64 value. + * + * @param virtualMemorySize64 the virtualMemorySize64 value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withVirtualMemorySize64(Long virtualMemorySize64) { + this.virtualMemorySize64 = virtualMemorySize64; + return this; + } + + /** + * Get the peakVirtualMemorySize64 value. + * + * @return the peakVirtualMemorySize64 value + */ + public Long peakVirtualMemorySize64() { + return this.peakVirtualMemorySize64; + } + + /** + * Set the peakVirtualMemorySize64 value. + * + * @param peakVirtualMemorySize64 the peakVirtualMemorySize64 value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPeakVirtualMemorySize64(Long peakVirtualMemorySize64) { + this.peakVirtualMemorySize64 = peakVirtualMemorySize64; + return this; + } + + /** + * Get the pagedSystemMemorySize64 value. + * + * @return the pagedSystemMemorySize64 value + */ + public Long pagedSystemMemorySize64() { + return this.pagedSystemMemorySize64; + } + + /** + * Set the pagedSystemMemorySize64 value. + * + * @param pagedSystemMemorySize64 the pagedSystemMemorySize64 value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPagedSystemMemorySize64(Long pagedSystemMemorySize64) { + this.pagedSystemMemorySize64 = pagedSystemMemorySize64; + return this; + } + + /** + * Get the nonpagedSystemMemorySize64 value. + * + * @return the nonpagedSystemMemorySize64 value + */ + public Long nonpagedSystemMemorySize64() { + return this.nonpagedSystemMemorySize64; + } + + /** + * Set the nonpagedSystemMemorySize64 value. + * + * @param nonpagedSystemMemorySize64 the nonpagedSystemMemorySize64 value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withNonpagedSystemMemorySize64(Long nonpagedSystemMemorySize64) { + this.nonpagedSystemMemorySize64 = nonpagedSystemMemorySize64; + return this; + } + + /** + * Get the pagedMemorySize64 value. + * + * @return the pagedMemorySize64 value + */ + public Long pagedMemorySize64() { + return this.pagedMemorySize64; + } + + /** + * Set the pagedMemorySize64 value. + * + * @param pagedMemorySize64 the pagedMemorySize64 value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPagedMemorySize64(Long pagedMemorySize64) { + this.pagedMemorySize64 = pagedMemorySize64; + return this; + } + + /** + * Get the peakPagedMemorySize64 value. + * + * @return the peakPagedMemorySize64 value + */ + public Long peakPagedMemorySize64() { + return this.peakPagedMemorySize64; + } + + /** + * Set the peakPagedMemorySize64 value. + * + * @param peakPagedMemorySize64 the peakPagedMemorySize64 value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPeakPagedMemorySize64(Long peakPagedMemorySize64) { + this.peakPagedMemorySize64 = peakPagedMemorySize64; + return this; + } + + /** + * Get the timeStamp value. + * + * @return the timeStamp value + */ + public DateTime timeStamp() { + return this.timeStamp; + } + + /** + * Set the timeStamp value. + * + * @param timeStamp the timeStamp value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withTimeStamp(DateTime timeStamp) { + this.timeStamp = timeStamp; + return this; + } + + /** + * Get the environmentVariables value. + * + * @return the environmentVariables value + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables value. + * + * @param environmentVariables the environmentVariables value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the isScmSite value. + * + * @return the isScmSite value + */ + public Boolean isScmSite() { + return this.isScmSite; + } + + /** + * Set the isScmSite value. + * + * @param isScmSite the isScmSite value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsScmSite(Boolean isScmSite) { + this.isScmSite = isScmSite; + return this; + } + + /** + * Get the isWebJob value. + * + * @return the isWebJob value + */ + public Boolean isWebJob() { + return this.isWebJob; + } + + /** + * Set the isWebJob value. + * + * @param isWebJob the isWebJob value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsWebJob(Boolean isWebJob) { + this.isWebJob = isWebJob; + return this; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProcessModuleInfoInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProcessModuleInfoInner.java new file mode 100644 index 00000000000..1c70c85e941 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProcessModuleInfoInner.java @@ -0,0 +1,306 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Process Module Information. + */ +@JsonFlatten +public class ProcessModuleInfoInner extends ProxyOnlyResource { + /** + * Base address. Used as module identifier in ARM resource URI. + */ + @JsonProperty(value = "properties.baseAddress") + private String baseAddress; + + /** + * File name. + */ + @JsonProperty(value = "properties.fileName") + private String fileName; + + /** + * HRef URI. + */ + @JsonProperty(value = "properties.href") + private String href; + + /** + * File path. + */ + @JsonProperty(value = "properties.filePath") + private String filePath; + + /** + * Module memory size. + */ + @JsonProperty(value = "properties.moduleMemorySize") + private Integer moduleMemorySize; + + /** + * File version. + */ + @JsonProperty(value = "properties.fileVersion") + private String fileVersion; + + /** + * File description. + */ + @JsonProperty(value = "properties.fileDescription") + private String fileDescription; + + /** + * Product name. + */ + @JsonProperty(value = "properties.product") + private String product; + + /** + * Product version. + */ + @JsonProperty(value = "properties.productVersion") + private String productVersion; + + /** + * Is debug?. + */ + @JsonProperty(value = "properties.isDebug") + private Boolean isDebug; + + /** + * Module language (locale). + */ + @JsonProperty(value = "properties.language") + private String language; + + /** + * Get the baseAddress value. + * + * @return the baseAddress value + */ + public String baseAddress() { + return this.baseAddress; + } + + /** + * Set the baseAddress value. + * + * @param baseAddress the baseAddress value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withBaseAddress(String baseAddress) { + this.baseAddress = baseAddress; + return this; + } + + /** + * Get the fileName value. + * + * @return the fileName value + */ + public String fileName() { + return this.fileName; + } + + /** + * Set the fileName value. + * + * @param fileName the fileName value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get the href value. + * + * @return the href value + */ + public String href() { + return this.href; + } + + /** + * Set the href value. + * + * @param href the href value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withHref(String href) { + this.href = href; + return this; + } + + /** + * Get the filePath value. + * + * @return the filePath value + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the filePath value. + * + * @param filePath the filePath value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get the moduleMemorySize value. + * + * @return the moduleMemorySize value + */ + public Integer moduleMemorySize() { + return this.moduleMemorySize; + } + + /** + * Set the moduleMemorySize value. + * + * @param moduleMemorySize the moduleMemorySize value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withModuleMemorySize(Integer moduleMemorySize) { + this.moduleMemorySize = moduleMemorySize; + return this; + } + + /** + * Get the fileVersion value. + * + * @return the fileVersion value + */ + public String fileVersion() { + return this.fileVersion; + } + + /** + * Set the fileVersion value. + * + * @param fileVersion the fileVersion value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFileVersion(String fileVersion) { + this.fileVersion = fileVersion; + return this; + } + + /** + * Get the fileDescription value. + * + * @return the fileDescription value + */ + public String fileDescription() { + return this.fileDescription; + } + + /** + * Set the fileDescription value. + * + * @param fileDescription the fileDescription value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFileDescription(String fileDescription) { + this.fileDescription = fileDescription; + return this; + } + + /** + * Get the product value. + * + * @return the product value + */ + public String product() { + return this.product; + } + + /** + * Set the product value. + * + * @param product the product value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the productVersion value. + * + * @return the productVersion value + */ + public String productVersion() { + return this.productVersion; + } + + /** + * Set the productVersion value. + * + * @param productVersion the productVersion value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withProductVersion(String productVersion) { + this.productVersion = productVersion; + return this; + } + + /** + * Get the isDebug value. + * + * @return the isDebug value + */ + public Boolean isDebug() { + return this.isDebug; + } + + /** + * Set the isDebug value. + * + * @param isDebug the isDebug value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withIsDebug(Boolean isDebug) { + this.isDebug = isDebug; + return this; + } + + /** + * Get the language value. + * + * @return the language value + */ + public String language() { + return this.language; + } + + /** + * Set the language value. + * + * @param language the language value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withLanguage(String language) { + this.language = language; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProcessThreadInfoInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProcessThreadInfoInner.java new file mode 100644 index 00000000000..fd009b0fbfd --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProcessThreadInfoInner.java @@ -0,0 +1,359 @@ +/** + * 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.web.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Process Thread Information. + */ +@JsonFlatten +public class ProcessThreadInfoInner extends ProxyOnlyResource { + /** + * ARM Identifier for deployment. + */ + @JsonProperty(value = "properties.id") + private Integer processThreadInfoId; + + /** + * HRef URI. + */ + @JsonProperty(value = "properties.href") + private String href; + + /** + * Process URI. + */ + @JsonProperty(value = "properties.process") + private String process; + + /** + * Start address. + */ + @JsonProperty(value = "properties.startAddress") + private String startAddress; + + /** + * Current thread priority. + */ + @JsonProperty(value = "properties.currentPriority") + private Integer currentPriority; + + /** + * Thread priority level. + */ + @JsonProperty(value = "properties.priorityLevel") + private String priorityLevel; + + /** + * Base priority. + */ + @JsonProperty(value = "properties.basePriority") + private Integer basePriority; + + /** + * Start time. + */ + @JsonProperty(value = "properties.startTime") + private DateTime startTime; + + /** + * Total processor time. + */ + @JsonProperty(value = "properties.totalProcessorTime") + private String totalProcessorTime; + + /** + * User processor time. + */ + @JsonProperty(value = "properties.userProcessorTime") + private String userProcessorTime; + + /** + * Priviledged processor time. + */ + @JsonProperty(value = "properties.priviledgedProcessorTime") + private String priviledgedProcessorTime; + + /** + * Thread state. + */ + @JsonProperty(value = "properties.state") + private String state; + + /** + * Wait reason. + */ + @JsonProperty(value = "properties.waitReason") + private String waitReason; + + /** + * Get the processThreadInfoId value. + * + * @return the processThreadInfoId value + */ + public Integer processThreadInfoId() { + return this.processThreadInfoId; + } + + /** + * Set the processThreadInfoId value. + * + * @param processThreadInfoId the processThreadInfoId value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withProcessThreadInfoId(Integer processThreadInfoId) { + this.processThreadInfoId = processThreadInfoId; + return this; + } + + /** + * Get the href value. + * + * @return the href value + */ + public String href() { + return this.href; + } + + /** + * Set the href value. + * + * @param href the href value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withHref(String href) { + this.href = href; + return this; + } + + /** + * Get the process value. + * + * @return the process value + */ + public String process() { + return this.process; + } + + /** + * Set the process value. + * + * @param process the process value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withProcess(String process) { + this.process = process; + return this; + } + + /** + * Get the startAddress value. + * + * @return the startAddress value + */ + public String startAddress() { + return this.startAddress; + } + + /** + * Set the startAddress value. + * + * @param startAddress the startAddress value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withStartAddress(String startAddress) { + this.startAddress = startAddress; + return this; + } + + /** + * Get the currentPriority value. + * + * @return the currentPriority value + */ + public Integer currentPriority() { + return this.currentPriority; + } + + /** + * Set the currentPriority value. + * + * @param currentPriority the currentPriority value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withCurrentPriority(Integer currentPriority) { + this.currentPriority = currentPriority; + return this; + } + + /** + * Get the priorityLevel value. + * + * @return the priorityLevel value + */ + public String priorityLevel() { + return this.priorityLevel; + } + + /** + * Set the priorityLevel value. + * + * @param priorityLevel the priorityLevel value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withPriorityLevel(String priorityLevel) { + this.priorityLevel = priorityLevel; + return this; + } + + /** + * Get the basePriority value. + * + * @return the basePriority value + */ + public Integer basePriority() { + return this.basePriority; + } + + /** + * Set the basePriority value. + * + * @param basePriority the basePriority value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withBasePriority(Integer basePriority) { + this.basePriority = basePriority; + 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 ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the totalProcessorTime value. + * + * @return the totalProcessorTime value + */ + public String totalProcessorTime() { + return this.totalProcessorTime; + } + + /** + * Set the totalProcessorTime value. + * + * @param totalProcessorTime the totalProcessorTime value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withTotalProcessorTime(String totalProcessorTime) { + this.totalProcessorTime = totalProcessorTime; + return this; + } + + /** + * Get the userProcessorTime value. + * + * @return the userProcessorTime value + */ + public String userProcessorTime() { + return this.userProcessorTime; + } + + /** + * Set the userProcessorTime value. + * + * @param userProcessorTime the userProcessorTime value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withUserProcessorTime(String userProcessorTime) { + this.userProcessorTime = userProcessorTime; + return this; + } + + /** + * Get the priviledgedProcessorTime value. + * + * @return the priviledgedProcessorTime value + */ + public String priviledgedProcessorTime() { + return this.priviledgedProcessorTime; + } + + /** + * Set the priviledgedProcessorTime value. + * + * @param priviledgedProcessorTime the priviledgedProcessorTime value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withPriviledgedProcessorTime(String priviledgedProcessorTime) { + this.priviledgedProcessorTime = priviledgedProcessorTime; + return this; + } + + /** + * Get the state value. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the state value. + * + * @param state the state value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withState(String state) { + this.state = state; + return this; + } + + /** + * Get the waitReason value. + * + * @return the waitReason value + */ + public String waitReason() { + return this.waitReason; + } + + /** + * Set the waitReason value. + * + * @param waitReason the waitReason value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withWaitReason(String waitReason) { + this.waitReason = waitReason; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProvidersInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProvidersInner.java new file mode 100644 index 00000000000..bd978f64fb3 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ProvidersInner.java @@ -0,0 +1,972 @@ +/** + * 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.web.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Providers. + */ +public 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", "x-ms-logging-context: com.microsoft.azure.management.web.Providers getAvailableStacks" }) + @GET("providers/Microsoft.Web/availableStacks") + Observable> getAvailableStacks(@Query("osTypeSelected") String osTypeSelected, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Providers listOperations" }) + @GET("providers/Microsoft.Web/operations") + Observable> listOperations(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Providers list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("osTypeSelected") String osTypeSelected, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Providers getAvailableStacksNext" }) + @GET + Observable> getAvailableStacksNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Providers listOperationsNext" }) + @GET + Observable> listOperationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Providers listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackInner> object if successful. + */ + public PagedList getAvailableStacks() { + ServiceResponse> response = getAvailableStacksSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getAvailableStacksNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getAvailableStacksAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getAvailableStacksSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getAvailableStacksNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable> getAvailableStacksAsync() { + return getAvailableStacksWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable>> getAvailableStacksWithServiceResponseAsync() { + return getAvailableStacksSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getAvailableStacksNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationStackInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getAvailableStacksSinglePageAsync() { + final String apiVersion = "2016-03-01"; + final String osTypeSelected = null; + return service.getAvailableStacks(osTypeSelected, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getAvailableStacksDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackInner> object if successful. + */ + public PagedList getAvailableStacks(final String osTypeSelected) { + ServiceResponse> response = getAvailableStacksSinglePageAsync(osTypeSelected).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getAvailableStacksNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getAvailableStacksAsync(final String osTypeSelected, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getAvailableStacksSinglePageAsync(osTypeSelected), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getAvailableStacksNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable> getAvailableStacksAsync(final String osTypeSelected) { + return getAvailableStacksWithServiceResponseAsync(osTypeSelected) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable>> getAvailableStacksWithServiceResponseAsync(final String osTypeSelected) { + return getAvailableStacksSinglePageAsync(osTypeSelected) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getAvailableStacksNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + ServiceResponse> * @param osTypeSelected Possible values include: 'Windows', 'Linux' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationStackInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getAvailableStacksSinglePageAsync(final String osTypeSelected) { + final String apiVersion = "2016-03-01"; + return service.getAvailableStacks(osTypeSelected, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getAvailableStacksDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getAvailableStacksDelegate(Response response) throws CloudException, IOException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmOperationDescriptionInner> object if successful. + */ + public PagedList listOperations() { + ServiceResponse> response = listOperationsSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listOperationsAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listOperationsSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable> listOperationsAsync() { + return listOperationsWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable>> listOperationsWithServiceResponseAsync() { + return listOperationsSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listOperationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CsmOperationDescriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listOperationsSinglePageAsync() { + final String apiVersion = "2016-03-01"; + return service.listOperations(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listOperationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listOperationsDelegate(Response response) throws CloudException, IOException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationStackInner> 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"; + final String osTypeSelected = null; + return service.list(this.client.subscriptionId(), osTypeSelected, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackInner> object if successful. + */ + public PagedList list(final String osTypeSelected) { + ServiceResponse> response = listSinglePageAsync(osTypeSelected).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String osTypeSelected, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(osTypeSelected), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable> listAsync(final String osTypeSelected) { + return listWithServiceResponseAsync(osTypeSelected) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable>> listWithServiceResponseAsync(final String osTypeSelected) { + return listSinglePageAsync(osTypeSelected) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + ServiceResponse> * @param osTypeSelected Possible values include: 'Windows', 'Linux' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationStackInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String osTypeSelected) { + 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(), osTypeSelected, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackInner> object if successful. + */ + public PagedList getAvailableStacksNext(final String nextPageLink) { + ServiceResponse> response = getAvailableStacksNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getAvailableStacksNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getAvailableStacksNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getAvailableStacksNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getAvailableStacksNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable> getAvailableStacksNextAsync(final String nextPageLink) { + return getAvailableStacksNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable>> getAvailableStacksNextWithServiceResponseAsync(final String nextPageLink) { + return getAvailableStacksNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getAvailableStacksNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationStackInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getAvailableStacksNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.getAvailableStacksNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getAvailableStacksNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getAvailableStacksNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmOperationDescriptionInner> object if successful. + */ + public PagedList listOperationsNext(final String nextPageLink) { + ServiceResponse> response = listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listOperationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listOperationsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable> listOperationsNextAsync(final String nextPageLink) { + return listOperationsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmOperationDescriptionInner> object + */ + public Observable>> listOperationsNextWithServiceResponseAsync(final String nextPageLink) { + return listOperationsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listOperationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CsmOperationDescriptionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listOperationsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listOperationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listOperationsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listOperationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get available application frameworks and their versions. + * Get available application frameworks and their versions. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationStackInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PublicCertificateInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PublicCertificateInner.java new file mode 100644 index 00000000000..a6d2cd40166 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PublicCertificateInner.java @@ -0,0 +1,89 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.PublicCertificateLocation; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Public certificate object. + */ +@JsonFlatten +public class PublicCertificateInner extends ProxyOnlyResource { + /** + * Public Certificate byte array. + */ + @JsonProperty(value = "properties.blob") + private byte[] blob; + + /** + * Public Certificate Location. Possible values include: 'CurrentUserMy', + * 'LocalMachineMy', 'Unknown'. + */ + @JsonProperty(value = "properties.publicCertificateLocation") + private PublicCertificateLocation publicCertificateLocation; + + /** + * Certificate Thumbprint. + */ + @JsonProperty(value = "properties.thumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String thumbprint; + + /** + * Get the blob value. + * + * @return the blob value + */ + public byte[] blob() { + return this.blob; + } + + /** + * Set the blob value. + * + * @param blob the blob value to set + * @return the PublicCertificateInner object itself. + */ + public PublicCertificateInner withBlob(byte[] blob) { + this.blob = blob; + return this; + } + + /** + * Get the publicCertificateLocation value. + * + * @return the publicCertificateLocation value + */ + public PublicCertificateLocation publicCertificateLocation() { + return this.publicCertificateLocation; + } + + /** + * Set the publicCertificateLocation value. + * + * @param publicCertificateLocation the publicCertificateLocation value to set + * @return the PublicCertificateInner object itself. + */ + public PublicCertificateInner withPublicCertificateLocation(PublicCertificateLocation publicCertificateLocation) { + this.publicCertificateLocation = publicCertificateLocation; + return this; + } + + /** + * Get the thumbprint value. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PushSettingsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PushSettingsInner.java new file mode 100644 index 00000000000..ae1c9b1f162 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/PushSettingsInner.java @@ -0,0 +1,130 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Push settings for the App. + */ +@JsonFlatten +public class PushSettingsInner extends ProxyOnlyResource { + /** + * Gets or sets a flag indicating whether the Push endpoint is enabled. + */ + @JsonProperty(value = "properties.isPushEnabled", required = true) + private boolean isPushEnabled; + + /** + * Gets or sets a JSON string containing a list of tags that are + * whitelisted for use by the push registration endpoint. + */ + @JsonProperty(value = "properties.tagWhitelistJson") + 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. + * Tags can consist of alphanumeric characters and the following: + * '_', '@', '#', '.', ':', '-'. + * Validation should be performed at the PushRequestHandler. + */ + @JsonProperty(value = "properties.tagsRequiringAuth") + 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. + */ + @JsonProperty(value = "properties.dynamicTagsJson") + 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-web/src/main/java/com/microsoft/azure/management/web/implementation/RecommendationInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RecommendationInner.java new file mode 100644 index 00000000000..7dabbc8253f --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RecommendationInner.java @@ -0,0 +1,580 @@ +/** + * 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.web.implementation; + +import org.joda.time.DateTime; +import java.util.UUID; +import com.microsoft.azure.management.web.ResourceScopeType; +import com.microsoft.azure.management.web.NotificationLevel; +import com.microsoft.azure.management.web.Channels; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Represents a recommendation result generated by the recommendation engine. + */ +@JsonFlatten +public class RecommendationInner extends ProxyOnlyResource { + /** + * Timestamp when this instance was created. + */ + @JsonProperty(value = "properties.creationTime") + private DateTime creationTime; + + /** + * A GUID value that each recommendation object is associated with. + */ + @JsonProperty(value = "properties.recommendationId") + private UUID recommendationId; + + /** + * Full ARM resource ID string that this recommendation object is + * associated with. + */ + @JsonProperty(value = "properties.resourceId") + private String resourceId; + + /** + * Name of a resource type this recommendation applies, e.g. Subscription, + * ServerFarm, Site. Possible values include: 'ServerFarm', 'Subscription', + * 'WebSite'. + */ + @JsonProperty(value = "properties.resourceScope") + private ResourceScopeType resourceScope; + + /** + * Unique name of the rule. + */ + @JsonProperty(value = "properties.ruleName") + private String ruleName; + + /** + * UI friendly name of the rule (may not be unique). + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /** + * Recommendation text. + */ + @JsonProperty(value = "properties.message") + private String message; + + /** + * Level indicating how critical this recommendation can impact. Possible + * values include: 'Critical', 'Warning', 'Information', + * 'NonUrgentSuggestion'. + */ + @JsonProperty(value = "properties.level") + private NotificationLevel level; + + /** + * List of channels that this recommendation can apply. Possible values + * include: 'Notification', 'Api', 'Email', 'Webhook', 'All'. + */ + @JsonProperty(value = "properties.channels") + private Channels channels; + + /** + * The list of category tags that this recommendation belongs to. + */ + @JsonProperty(value = "properties.tags") + private List tags; + + /** + * Name of action recommended by this object. + */ + @JsonProperty(value = "properties.actionName") + private String actionName; + + /** + * The beginning time in UTC of a range that the recommendation refers to. + */ + @JsonProperty(value = "properties.startTime") + private DateTime startTime; + + /** + * The end time in UTC of a range that the recommendation refers to. + */ + @JsonProperty(value = "properties.endTime") + private DateTime endTime; + + /** + * When to notify this recommendation next in UTC. Null means that this + * will never be notified anymore. + */ + @JsonProperty(value = "properties.nextNotificationTime") + private DateTime nextNotificationTime; + + /** + * Date and time in UTC when this notification expires. + */ + @JsonProperty(value = "properties.notificationExpirationTime") + private DateTime notificationExpirationTime; + + /** + * Last timestamp in UTC this instance was actually notified. Null means + * that this recommendation hasn't been notified yet. + */ + @JsonProperty(value = "properties.notifiedTime") + private DateTime notifiedTime; + + /** + * A metric value measured by the rule. + */ + @JsonProperty(value = "properties.score") + private Double score; + + /** + * True if this is associated with a dynamically added rule. + */ + @JsonProperty(value = "properties.isDynamic") + private Boolean isDynamic; + + /** + * Extension name of the portal if exists. + */ + @JsonProperty(value = "properties.extensionName") + private String extensionName; + + /** + * Deep link to a blade on the portal. + */ + @JsonProperty(value = "properties.bladeName") + private String bladeName; + + /** + * Forward link to an external document associated with the rule. + */ + @JsonProperty(value = "properties.forwardLink") + private String forwardLink; + + /** + * Get the creationTime value. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Set the creationTime value. + * + * @param creationTime the creationTime value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withCreationTime(DateTime creationTime) { + this.creationTime = creationTime; + return this; + } + + /** + * Get the recommendationId value. + * + * @return the recommendationId value + */ + public UUID recommendationId() { + return this.recommendationId; + } + + /** + * Set the recommendationId value. + * + * @param recommendationId the recommendationId value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withRecommendationId(UUID recommendationId) { + this.recommendationId = recommendationId; + return this; + } + + /** + * Get the resourceId value. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId value. + * + * @param resourceId the resourceId value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the resourceScope value. + * + * @return the resourceScope value + */ + public ResourceScopeType resourceScope() { + return this.resourceScope; + } + + /** + * Set the resourceScope value. + * + * @param resourceScope the resourceScope value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withResourceScope(ResourceScopeType resourceScope) { + this.resourceScope = resourceScope; + return this; + } + + /** + * Get the ruleName value. + * + * @return the ruleName value + */ + public String ruleName() { + return this.ruleName; + } + + /** + * Set the ruleName value. + * + * @param ruleName the ruleName value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withRuleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get the displayName value. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName value. + * + * @param displayName the displayName value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withDisplayName(String displayName) { + this.displayName = displayName; + 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 RecommendationInner object itself. + */ + public RecommendationInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the level value. + * + * @return the level value + */ + public NotificationLevel level() { + return this.level; + } + + /** + * Set the level value. + * + * @param level the level value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withLevel(NotificationLevel level) { + this.level = level; + return this; + } + + /** + * Get the channels value. + * + * @return the channels value + */ + public Channels channels() { + return this.channels; + } + + /** + * Set the channels value. + * + * @param channels the channels value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withChannels(Channels channels) { + this.channels = channels; + return this; + } + + /** + * Get the tags value. + * + * @return the tags value + */ + public List tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withTags(List tags) { + this.tags = tags; + return this; + } + + /** + * Get the actionName value. + * + * @return the actionName value + */ + public String actionName() { + return this.actionName; + } + + /** + * Set the actionName value. + * + * @param actionName the actionName value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withActionName(String actionName) { + this.actionName = actionName; + 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 RecommendationInner object itself. + */ + public RecommendationInner 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 RecommendationInner object itself. + */ + public RecommendationInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the nextNotificationTime value. + * + * @return the nextNotificationTime value + */ + public DateTime nextNotificationTime() { + return this.nextNotificationTime; + } + + /** + * Set the nextNotificationTime value. + * + * @param nextNotificationTime the nextNotificationTime value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withNextNotificationTime(DateTime nextNotificationTime) { + this.nextNotificationTime = nextNotificationTime; + return this; + } + + /** + * Get the notificationExpirationTime value. + * + * @return the notificationExpirationTime value + */ + public DateTime notificationExpirationTime() { + return this.notificationExpirationTime; + } + + /** + * Set the notificationExpirationTime value. + * + * @param notificationExpirationTime the notificationExpirationTime value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withNotificationExpirationTime(DateTime notificationExpirationTime) { + this.notificationExpirationTime = notificationExpirationTime; + return this; + } + + /** + * Get the notifiedTime value. + * + * @return the notifiedTime value + */ + public DateTime notifiedTime() { + return this.notifiedTime; + } + + /** + * Set the notifiedTime value. + * + * @param notifiedTime the notifiedTime value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withNotifiedTime(DateTime notifiedTime) { + this.notifiedTime = notifiedTime; + return this; + } + + /** + * Get the score value. + * + * @return the score value + */ + public Double score() { + return this.score; + } + + /** + * Set the score value. + * + * @param score the score value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withScore(Double score) { + this.score = score; + return this; + } + + /** + * Get the isDynamic value. + * + * @return the isDynamic value + */ + public Boolean isDynamic() { + return this.isDynamic; + } + + /** + * Set the isDynamic value. + * + * @param isDynamic the isDynamic value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withIsDynamic(Boolean isDynamic) { + this.isDynamic = isDynamic; + return this; + } + + /** + * Get the extensionName value. + * + * @return the extensionName value + */ + public String extensionName() { + return this.extensionName; + } + + /** + * Set the extensionName value. + * + * @param extensionName the extensionName value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withExtensionName(String extensionName) { + this.extensionName = extensionName; + return this; + } + + /** + * Get the bladeName value. + * + * @return the bladeName value + */ + public String bladeName() { + return this.bladeName; + } + + /** + * Set the bladeName value. + * + * @param bladeName the bladeName value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withBladeName(String bladeName) { + this.bladeName = bladeName; + return this; + } + + /** + * Get the forwardLink value. + * + * @return the forwardLink value + */ + public String forwardLink() { + return this.forwardLink; + } + + /** + * Set the forwardLink value. + * + * @param forwardLink the forwardLink value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withForwardLink(String forwardLink) { + this.forwardLink = forwardLink; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RecommendationRuleInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RecommendationRuleInner.java new file mode 100644 index 00000000000..20b7d412ddd --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RecommendationRuleInner.java @@ -0,0 +1,367 @@ +/** + * 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.web.implementation; + +import java.util.UUID; +import com.microsoft.azure.management.web.NotificationLevel; +import com.microsoft.azure.management.web.Channels; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Represents a recommendation rule that the recommendation engine can perform. + */ +@JsonFlatten +public class RecommendationRuleInner extends ProxyOnlyResource { + /** + * Unique name of the rule. + */ + @JsonProperty(value = "properties.name") + private String recommendationRuleName; + + /** + * UI friendly name of the rule. + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /** + * Localized name of the rule (Good for UI). + */ + @JsonProperty(value = "properties.message") + private String message; + + /** + * Recommendation ID of an associated recommendation object tied to the + * rule, if exists. + * If such an object doesn't exist, it is set to null. + */ + @JsonProperty(value = "properties.recommendationId") + private UUID recommendationId; + + /** + * Localized detailed description of the rule. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * Name of action that is recommended by this rule in string. + */ + @JsonProperty(value = "properties.actionName") + private String actionName; + + /** + * Level of impact indicating how critical this rule is. Possible values + * include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion'. + */ + @JsonProperty(value = "properties.level") + private NotificationLevel level; + + /** + * List of available channels that this rule applies. Possible values + * include: 'Notification', 'Api', 'Email', 'Webhook', 'All'. + */ + @JsonProperty(value = "properties.channels") + private Channels channels; + + /** + * An array of category tags that the rule contains. + */ + @JsonProperty(value = "properties.tags") + private List tags; + + /** + * True if this is associated with a dynamically added rule. + */ + @JsonProperty(value = "properties.isDynamic") + private Boolean isDynamic; + + /** + * Extension name of the portal if exists. Applicable to dynamic rule only. + */ + @JsonProperty(value = "properties.extensionName") + private String extensionName; + + /** + * Deep link to a blade on the portal. Applicable to dynamic rule only. + */ + @JsonProperty(value = "properties.bladeName") + private String bladeName; + + /** + * Forward link to an external document associated with the rule. + * Applicable to dynamic rule only. + */ + @JsonProperty(value = "properties.forwardLink") + private String forwardLink; + + /** + * Get the recommendationRuleName value. + * + * @return the recommendationRuleName value + */ + public String recommendationRuleName() { + return this.recommendationRuleName; + } + + /** + * Set the recommendationRuleName value. + * + * @param recommendationRuleName the recommendationRuleName value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withRecommendationRuleName(String recommendationRuleName) { + this.recommendationRuleName = recommendationRuleName; + return this; + } + + /** + * Get the displayName value. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName value. + * + * @param displayName the displayName value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withDisplayName(String displayName) { + this.displayName = displayName; + 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 RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the recommendationId value. + * + * @return the recommendationId value + */ + public UUID recommendationId() { + return this.recommendationId; + } + + /** + * Set the recommendationId value. + * + * @param recommendationId the recommendationId value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withRecommendationId(UUID recommendationId) { + this.recommendationId = recommendationId; + return this; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actionName value. + * + * @return the actionName value + */ + public String actionName() { + return this.actionName; + } + + /** + * Set the actionName value. + * + * @param actionName the actionName value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withActionName(String actionName) { + this.actionName = actionName; + return this; + } + + /** + * Get the level value. + * + * @return the level value + */ + public NotificationLevel level() { + return this.level; + } + + /** + * Set the level value. + * + * @param level the level value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withLevel(NotificationLevel level) { + this.level = level; + return this; + } + + /** + * Get the channels value. + * + * @return the channels value + */ + public Channels channels() { + return this.channels; + } + + /** + * Set the channels value. + * + * @param channels the channels value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withChannels(Channels channels) { + this.channels = channels; + return this; + } + + /** + * Get the tags value. + * + * @return the tags value + */ + public List tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withTags(List tags) { + this.tags = tags; + return this; + } + + /** + * Get the isDynamic value. + * + * @return the isDynamic value + */ + public Boolean isDynamic() { + return this.isDynamic; + } + + /** + * Set the isDynamic value. + * + * @param isDynamic the isDynamic value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withIsDynamic(Boolean isDynamic) { + this.isDynamic = isDynamic; + return this; + } + + /** + * Get the extensionName value. + * + * @return the extensionName value + */ + public String extensionName() { + return this.extensionName; + } + + /** + * Set the extensionName value. + * + * @param extensionName the extensionName value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withExtensionName(String extensionName) { + this.extensionName = extensionName; + return this; + } + + /** + * Get the bladeName value. + * + * @return the bladeName value + */ + public String bladeName() { + return this.bladeName; + } + + /** + * Set the bladeName value. + * + * @param bladeName the bladeName value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withBladeName(String bladeName) { + this.bladeName = bladeName; + return this; + } + + /** + * Get the forwardLink value. + * + * @return the forwardLink value + */ + public String forwardLink() { + return this.forwardLink; + } + + /** + * Set the forwardLink value. + * + * @param forwardLink the forwardLink value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withForwardLink(String forwardLink) { + this.forwardLink = forwardLink; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RecommendationsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RecommendationsInner.java new file mode 100644 index 00000000000..489f62d4c17 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RecommendationsInner.java @@ -0,0 +1,1806 @@ +/** + * 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.web.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Recommendations. + */ +public class RecommendationsInner { + /** The Retrofit service to perform REST calls. */ + private RecommendationsService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * Initializes an instance of RecommendationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public RecommendationsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(RecommendationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Recommendations to be + * used by Retrofit to perform actually REST calls. + */ + interface RecommendationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("featured") Boolean featured, @Query(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations resetAllFilters" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset") + Observable> resetAllFilters(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations disableRecommendationForSubscription" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable") + Observable> disableRecommendationForSubscription(@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", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations listHistoryForWebApp" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations listRecommendedRulesForWebApp" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") + Observable> listRecommendedRulesForWebApp(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("subscriptionId") String subscriptionId, @Query("featured") Boolean featured, @Query(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations disableAllForWebApp" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable") + Observable> disableAllForWebApp(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations resetAllFiltersForWebApp" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset") + Observable> resetAllFiltersForWebApp(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations getRuleDetailsByWebApp" }) + @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("recommendationId") String recommendationId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations disableRecommendationForSite" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable") + Observable> disableRecommendationForSite(@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); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations listHistoryForWebAppNext" }) + @GET + Observable> listHistoryForWebAppNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.Recommendations listRecommendedRulesForWebAppNext" }) + @GET + Observable> listRecommendedRulesForWebAppNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RecommendationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecommendationInner> 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"; + final Boolean featured = null; + final String filter = null; + return service.list(this.client.subscriptionId(), featured, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @param featured Specify <code>true</code> to return only the most critical recommendations. The default is <code>false</code>, which returns all recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RecommendationInner> object if successful. + */ + public PagedList list(final Boolean featured, final String filter) { + ServiceResponse> response = listSinglePageAsync(featured, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @param featured Specify <code>true</code> to return only the most critical recommendations. The default is <code>false</code>, which returns all recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final Boolean featured, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(featured, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @param featured Specify <code>true</code> to return only the most critical recommendations. The default is <code>false</code>, which returns all recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listAsync(final Boolean featured, final String filter) { + return listWithServiceResponseAsync(featured, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @param featured Specify <code>true</code> to return only the most critical recommendations. The default is <code>false</code>, which returns all recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listWithServiceResponseAsync(final Boolean featured, final String filter) { + return listSinglePageAsync(featured, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + ServiceResponse> * @param featured Specify <code>true</code> to return only the most critical recommendations. The default is <code>false</code>, which returns all recommendations. + ServiceResponse> * @param filter Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecommendationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final Boolean featured, final String filter) { + 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(), featured, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reset all recommendation opt-out settings for a subscription. + * Reset all recommendation opt-out settings for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resetAllFilters() { + resetAllFiltersWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Reset all recommendation opt-out settings for a subscription. + * Reset all recommendation opt-out settings for a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resetAllFiltersAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetAllFiltersWithServiceResponseAsync(), serviceCallback); + } + + /** + * Reset all recommendation opt-out settings for a subscription. + * Reset all recommendation opt-out settings for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable resetAllFiltersAsync() { + return resetAllFiltersWithServiceResponseAsync().map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reset all recommendation opt-out settings for a subscription. + * Reset all recommendation opt-out settings for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> resetAllFiltersWithServiceResponseAsync() { + 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.resetAllFilters(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resetAllFiltersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resetAllFiltersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Disables the specified rule so it will not apply to a subscription in the future. + * Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void disableRecommendationForSubscription(String name) { + disableRecommendationForSubscriptionWithServiceResponseAsync(name).toBlocking().single().body(); + } + + /** + * Disables the specified rule so it will not apply to a subscription in the future. + * Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture disableRecommendationForSubscriptionAsync(String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disableRecommendationForSubscriptionWithServiceResponseAsync(name), serviceCallback); + } + + /** + * Disables the specified rule so it will not apply to a subscription in the future. + * Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable disableRecommendationForSubscriptionAsync(String name) { + return disableRecommendationForSubscriptionWithServiceResponseAsync(name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Disables the specified rule so it will not apply to a subscription in the future. + * Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> disableRecommendationForSubscriptionWithServiceResponseAsync(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."); + } + final String apiVersion = "2016-03-01"; + return service.disableRecommendationForSubscription(name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = disableRecommendationForSubscriptionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse disableRecommendationForSubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RecommendationInner> object if successful. + */ + public PagedList listHistoryForWebApp(final String resourceGroupName, final String siteName) { + ServiceResponse> response = listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHistoryForWebAppNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listHistoryForWebAppAsync(final String resourceGroupName, final String siteName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHistoryForWebAppNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listHistoryForWebAppAsync(final String resourceGroupName, final String siteName) { + return listHistoryForWebAppWithServiceResponseAsync(resourceGroupName, siteName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listHistoryForWebAppWithServiceResponseAsync(final String resourceGroupName, final String siteName) { + return listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHistoryForWebAppNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecommendationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listHistoryForWebAppSinglePageAsync(final String resourceGroupName, final 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 (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 filter = null; + return service.listHistoryForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHistoryForWebAppDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param filter Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RecommendationInner> object if successful. + */ + public PagedList listHistoryForWebApp(final String resourceGroupName, final String siteName, final String filter) { + ServiceResponse> response = listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHistoryForWebAppNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param filter Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listHistoryForWebAppAsync(final String resourceGroupName, final String siteName, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHistoryForWebAppNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param filter Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listHistoryForWebAppAsync(final String resourceGroupName, final String siteName, final String filter) { + return listHistoryForWebAppWithServiceResponseAsync(resourceGroupName, siteName, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param filter Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listHistoryForWebAppWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String filter) { + return listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHistoryForWebAppNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param siteName Name of the app. + ServiceResponse> * @param filter Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecommendationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listHistoryForWebAppSinglePageAsync(final String resourceGroupName, final String siteName, final String filter) { + 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 (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(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHistoryForWebAppDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHistoryForWebAppDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RecommendationInner> object if successful. + */ + public PagedList listRecommendedRulesForWebApp(final String resourceGroupName, final String siteName) { + ServiceResponse> response = listRecommendedRulesForWebAppSinglePageAsync(resourceGroupName, siteName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRecommendedRulesForWebAppNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listRecommendedRulesForWebAppAsync(final String resourceGroupName, final String siteName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRecommendedRulesForWebAppSinglePageAsync(resourceGroupName, siteName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRecommendedRulesForWebAppNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listRecommendedRulesForWebAppAsync(final String resourceGroupName, final String siteName) { + return listRecommendedRulesForWebAppWithServiceResponseAsync(resourceGroupName, siteName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listRecommendedRulesForWebAppWithServiceResponseAsync(final String resourceGroupName, final String siteName) { + return listRecommendedRulesForWebAppSinglePageAsync(resourceGroupName, siteName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listRecommendedRulesForWebAppNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecommendationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRecommendedRulesForWebAppSinglePageAsync(final String resourceGroupName, final 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + final Boolean featured = null; + final String filter = null; + return service.listRecommendedRulesForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), featured, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRecommendedRulesForWebAppDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The default is <code>false</code>, which returns all recommendations. + * @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' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RecommendationInner> object if successful. + */ + public PagedList listRecommendedRulesForWebApp(final String resourceGroupName, final String siteName, final Boolean featured, final String filter) { + ServiceResponse> response = listRecommendedRulesForWebAppSinglePageAsync(resourceGroupName, siteName, featured, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRecommendedRulesForWebAppNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The default is <code>false</code>, which returns all recommendations. + * @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' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listRecommendedRulesForWebAppAsync(final String resourceGroupName, final String siteName, final Boolean featured, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRecommendedRulesForWebAppSinglePageAsync(resourceGroupName, siteName, featured, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRecommendedRulesForWebAppNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The default is <code>false</code>, which returns all recommendations. + * @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' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listRecommendedRulesForWebAppAsync(final String resourceGroupName, final String siteName, final Boolean featured, final String filter) { + return listRecommendedRulesForWebAppWithServiceResponseAsync(resourceGroupName, siteName, featured, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The default is <code>false</code>, which returns all recommendations. + * @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' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listRecommendedRulesForWebAppWithServiceResponseAsync(final String resourceGroupName, final String siteName, final Boolean featured, final String filter) { + return listRecommendedRulesForWebAppSinglePageAsync(resourceGroupName, siteName, featured, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listRecommendedRulesForWebAppNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param siteName Name of the app. + ServiceResponse> * @param featured Specify <code>true</code> to return only the most critical recommendations. The default is <code>false</code>, which returns all recommendations. + ServiceResponse> * @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' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecommendationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRecommendedRulesForWebAppSinglePageAsync(final String resourceGroupName, final String siteName, final Boolean featured, final String filter) { + 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 (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.listRecommendedRulesForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), featured, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRecommendedRulesForWebAppDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRecommendedRulesForWebAppDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Disable all recommendations for an app. + * Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void disableAllForWebApp(String resourceGroupName, String siteName) { + disableAllForWebAppWithServiceResponseAsync(resourceGroupName, siteName).toBlocking().single().body(); + } + + /** + * Disable all recommendations for an app. + * Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture disableAllForWebAppAsync(String resourceGroupName, String siteName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disableAllForWebAppWithServiceResponseAsync(resourceGroupName, siteName), serviceCallback); + } + + /** + * Disable all recommendations for an app. + * Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable disableAllForWebAppAsync(String resourceGroupName, String siteName) { + return disableAllForWebAppWithServiceResponseAsync(resourceGroupName, siteName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Disable all recommendations for an app. + * Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> disableAllForWebAppWithServiceResponseAsync(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 (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.disableAllForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = disableAllForWebAppDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse disableAllForWebAppDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reset all recommendation opt-out settings for an app. + * Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resetAllFiltersForWebApp(String resourceGroupName, String siteName) { + resetAllFiltersForWebAppWithServiceResponseAsync(resourceGroupName, siteName).toBlocking().single().body(); + } + + /** + * Reset all recommendation opt-out settings for an app. + * Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resetAllFiltersForWebAppAsync(String resourceGroupName, String siteName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetAllFiltersForWebAppWithServiceResponseAsync(resourceGroupName, siteName), serviceCallback); + } + + /** + * Reset all recommendation opt-out settings for an app. + * Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable resetAllFiltersForWebAppAsync(String resourceGroupName, String siteName) { + return resetAllFiltersForWebAppWithServiceResponseAsync(resourceGroupName, siteName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reset all recommendation opt-out settings for an app. + * Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> resetAllFiltersForWebAppWithServiceResponseAsync(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 (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.resetAllFiltersForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resetAllFiltersForWebAppDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resetAllFiltersForWebAppDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a recommendation rule for an app. + * Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecommendationRuleInner object if successful. + */ + public RecommendationRuleInner getRuleDetailsByWebApp(String resourceGroupName, String siteName, String name) { + return getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name).toBlocking().single().body(); + } + + /** + * Get a recommendation rule for an app. + * Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name), serviceCallback); + } + + /** + * Get a recommendation rule for an app. + * Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecommendationRuleInner object + */ + public Observable getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name) { + return getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name).map(new Func1, RecommendationRuleInner>() { + @Override + public RecommendationRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a recommendation rule for an app. + * Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecommendationRuleInner object + */ + 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."); + } + final String apiVersion = "2016-03-01"; + final Boolean updateSeen = null; + final String recommendationId = null; + return service.getRuleDetailsByWebApp(resourceGroupName, siteName, name, this.client.subscriptionId(), updateSeen, recommendationId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getRuleDetailsByWebAppDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get a recommendation rule for an app. + * Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation object. + * @param recommendationId The GUID of the recommedation object if you query an expired one. You don't need to specify it to query an active entry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecommendationRuleInner object if successful. + */ + public RecommendationRuleInner getRuleDetailsByWebApp(String resourceGroupName, String siteName, String name, Boolean updateSeen, String recommendationId) { + return getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name, updateSeen, recommendationId).toBlocking().single().body(); + } + + /** + * Get a recommendation rule for an app. + * Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation object. + * @param recommendationId The GUID of the recommedation object if you query an expired one. You don't need to specify it to query an active entry. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name, Boolean updateSeen, String recommendationId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name, updateSeen, recommendationId), serviceCallback); + } + + /** + * Get a recommendation rule for an app. + * Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation object. + * @param recommendationId The GUID of the recommedation object if you query an expired one. You don't need to specify it to query an active entry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecommendationRuleInner object + */ + public Observable getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name, Boolean updateSeen, String recommendationId) { + return getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name, updateSeen, recommendationId).map(new Func1, RecommendationRuleInner>() { + @Override + public RecommendationRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a recommendation rule for an app. + * Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation object. + * @param recommendationId The GUID of the recommedation object if you query an expired one. You don't need to specify it to query an active entry. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecommendationRuleInner object + */ + public Observable> getRuleDetailsByWebAppWithServiceResponseAsync(String resourceGroupName, String siteName, String name, Boolean updateSeen, String recommendationId) { + 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."); + } + final String apiVersion = "2016-03-01"; + return service.getRuleDetailsByWebApp(resourceGroupName, siteName, name, this.client.subscriptionId(), updateSeen, recommendationId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getRuleDetailsByWebAppDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getRuleDetailsByWebAppDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Disables the specific rule for a web site permanently. + * Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name + * @param name Rule name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void disableRecommendationForSite(String resourceGroupName, String siteName, String name) { + disableRecommendationForSiteWithServiceResponseAsync(resourceGroupName, siteName, name).toBlocking().single().body(); + } + + /** + * Disables the specific rule for a web site permanently. + * Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name + * @param name Rule name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture disableRecommendationForSiteAsync(String resourceGroupName, String siteName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disableRecommendationForSiteWithServiceResponseAsync(resourceGroupName, siteName, name), serviceCallback); + } + + /** + * Disables the specific rule for a web site permanently. + * Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name + * @param name Rule name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable disableRecommendationForSiteAsync(String resourceGroupName, String siteName, String name) { + return disableRecommendationForSiteWithServiceResponseAsync(resourceGroupName, siteName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Disables the specific rule for a web site permanently. + * Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name + * @param name Rule name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> disableRecommendationForSiteWithServiceResponseAsync(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."); + } + final String apiVersion = "2016-03-01"; + return service.disableRecommendationForSite(resourceGroupName, siteName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = disableRecommendationForSiteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse disableRecommendationForSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RecommendationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all recommendations for a subscription. + * List all recommendations for a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecommendationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RecommendationInner> object if successful. + */ + public PagedList listHistoryForWebAppNext(final String nextPageLink) { + ServiceResponse> response = listHistoryForWebAppNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHistoryForWebAppNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listHistoryForWebAppNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHistoryForWebAppNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHistoryForWebAppNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listHistoryForWebAppNextAsync(final String nextPageLink) { + return listHistoryForWebAppNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listHistoryForWebAppNextWithServiceResponseAsync(final String nextPageLink) { + return listHistoryForWebAppNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHistoryForWebAppNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Get past recommendations for an app, optionally specified by the time range. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecommendationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listHistoryForWebAppNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listHistoryForWebAppNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHistoryForWebAppNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHistoryForWebAppNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RecommendationInner> object if successful. + */ + public PagedList listRecommendedRulesForWebAppNext(final String nextPageLink) { + ServiceResponse> response = listRecommendedRulesForWebAppNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRecommendedRulesForWebAppNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listRecommendedRulesForWebAppNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRecommendedRulesForWebAppNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRecommendedRulesForWebAppNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listRecommendedRulesForWebAppNextAsync(final String nextPageLink) { + return listRecommendedRulesForWebAppNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listRecommendedRulesForWebAppNextWithServiceResponseAsync(final String nextPageLink) { + return listRecommendedRulesForWebAppNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listRecommendedRulesForWebAppNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all recommendations for an app. + * Get all recommendations for an app. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecommendationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRecommendedRulesForWebAppNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listRecommendedRulesForWebAppNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRecommendedRulesForWebAppNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRecommendedRulesForWebAppNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ReissueCertificateOrderRequestInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ReissueCertificateOrderRequestInner.java new file mode 100644 index 00000000000..2cbe8618562 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ReissueCertificateOrderRequestInner.java @@ -0,0 +1,126 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Class representing certificate reissue request. + */ +@JsonFlatten +public class ReissueCertificateOrderRequestInner extends ProxyOnlyResource { + /** + * Certificate Key Size. + */ + @JsonProperty(value = "properties.keySize") + private Integer keySize; + + /** + * Delay in hours to revoke existing certificate after the new certificate + * is issued. + */ + @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. + * + * @return the keySize value + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set the keySize value. + * + * @param keySize the keySize value to set + * @return the ReissueCertificateOrderRequestInner object itself. + */ + public ReissueCertificateOrderRequestInner withKeySize(Integer keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get the delayExistingRevokeInHours value. + * + * @return the delayExistingRevokeInHours value + */ + public Integer delayExistingRevokeInHours() { + return this.delayExistingRevokeInHours; + } + + /** + * Set the delayExistingRevokeInHours value. + * + * @param delayExistingRevokeInHours the delayExistingRevokeInHours value to set + * @return the ReissueCertificateOrderRequestInner object itself. + */ + public ReissueCertificateOrderRequestInner withDelayExistingRevokeInHours(Integer delayExistingRevokeInHours) { + this.delayExistingRevokeInHours = delayExistingRevokeInHours; + 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-web/src/main/java/com/microsoft/azure/management/web/implementation/RelayServiceConnectionEntityInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RelayServiceConnectionEntityInner.java new file mode 100644 index 00000000000..75185d74c44 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RelayServiceConnectionEntityInner.java @@ -0,0 +1,202 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Hybrid Connection for an App Service app. + */ +@JsonFlatten +public class RelayServiceConnectionEntityInner extends ProxyOnlyResource { + /** + * The entityName property. + */ + @JsonProperty(value = "properties.entityName") + private String entityName; + + /** + * The entityConnectionString property. + */ + @JsonProperty(value = "properties.entityConnectionString") + private String entityConnectionString; + + /** + * The resourceType property. + */ + @JsonProperty(value = "properties.resourceType") + private String resourceType; + + /** + * The resourceConnectionString property. + */ + @JsonProperty(value = "properties.resourceConnectionString") + private String resourceConnectionString; + + /** + * The hostname property. + */ + @JsonProperty(value = "properties.hostname") + private String hostname; + + /** + * The port property. + */ + @JsonProperty(value = "properties.port") + private Integer port; + + /** + * The biztalkUri property. + */ + @JsonProperty(value = "properties.biztalkUri") + private String biztalkUri; + + /** + * Get the entityName value. + * + * @return the entityName value + */ + public String entityName() { + return this.entityName; + } + + /** + * Set the entityName value. + * + * @param entityName the entityName value to set + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withEntityName(String entityName) { + this.entityName = entityName; + return this; + } + + /** + * Get the entityConnectionString value. + * + * @return the entityConnectionString value + */ + public String entityConnectionString() { + return this.entityConnectionString; + } + + /** + * Set the entityConnectionString value. + * + * @param entityConnectionString the entityConnectionString value to set + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withEntityConnectionString(String entityConnectionString) { + this.entityConnectionString = entityConnectionString; + return this; + } + + /** + * Get the resourceType value. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType value. + * + * @param resourceType the resourceType value to set + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the resourceConnectionString value. + * + * @return the resourceConnectionString value + */ + public String resourceConnectionString() { + return this.resourceConnectionString; + } + + /** + * Set the resourceConnectionString value. + * + * @param resourceConnectionString the resourceConnectionString value to set + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withResourceConnectionString(String resourceConnectionString) { + this.resourceConnectionString = resourceConnectionString; + 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 RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner 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 RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the biztalkUri value. + * + * @return the biztalkUri value + */ + public String biztalkUri() { + return this.biztalkUri; + } + + /** + * Set the biztalkUri value. + * + * @param biztalkUri the biztalkUri value to set + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withBiztalkUri(String biztalkUri) { + this.biztalkUri = biztalkUri; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RenewCertificateOrderRequestInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RenewCertificateOrderRequestInner.java new file mode 100644 index 00000000000..d4d2b02fa49 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RenewCertificateOrderRequestInner.java @@ -0,0 +1,99 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Class representing certificate renew request. + */ +@JsonFlatten +public class RenewCertificateOrderRequestInner extends ProxyOnlyResource { + /** + * Certificate Key Size. + */ + @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. + * + * @return the keySize value + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set the keySize value. + * + * @param keySize the keySize value to set + * @return the RenewCertificateOrderRequestInner object itself. + */ + public RenewCertificateOrderRequestInner withKeySize(Integer keySize) { + this.keySize = 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-web/src/main/java/com/microsoft/azure/management/web/implementation/ResourceMetricDefinitionInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ResourceMetricDefinitionInner.java new file mode 100644 index 00000000000..b5dd2492289 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ResourceMetricDefinitionInner.java @@ -0,0 +1,130 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.ResourceMetricName; +import java.util.List; +import com.microsoft.azure.management.web.ResourceMetricAvailability; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Metadata for the metrics. + */ +@JsonFlatten +public class ResourceMetricDefinitionInner extends ProxyOnlyResource { + /** + * Name of the metric. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private ResourceMetricName resourceMetricDefinitionName; + + /** + * Unit of the metric. + */ + @JsonProperty(value = "properties.unit", access = JsonProperty.Access.WRITE_ONLY) + private String unit; + + /** + * Primary aggregation type. + */ + @JsonProperty(value = "properties.primaryAggregationType", access = JsonProperty.Access.WRITE_ONLY) + private String primaryAggregationType; + + /** + * List of time grains supported for the metric together with retention + * period. + */ + @JsonProperty(value = "properties.metricAvailabilities", access = JsonProperty.Access.WRITE_ONLY) + private List metricAvailabilities; + + /** + * Resource URI. + */ + @JsonProperty(value = "properties.resourceUri", access = JsonProperty.Access.WRITE_ONLY) + private String resourceUri; + + /** + * Resource ID. + */ + @JsonProperty(value = "properties.id", access = JsonProperty.Access.WRITE_ONLY) + private String resourceMetricDefinitionId; + + /** + * Resource metric definition properties. + */ + @JsonProperty(value = "properties.properties", access = JsonProperty.Access.WRITE_ONLY) + private Map properties; + + /** + * Get the resourceMetricDefinitionName value. + * + * @return the resourceMetricDefinitionName value + */ + public ResourceMetricName resourceMetricDefinitionName() { + return this.resourceMetricDefinitionName; + } + + /** + * Get the unit value. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Get the primaryAggregationType value. + * + * @return the primaryAggregationType value + */ + public String primaryAggregationType() { + return this.primaryAggregationType; + } + + /** + * Get the metricAvailabilities value. + * + * @return the metricAvailabilities value + */ + public List metricAvailabilities() { + return this.metricAvailabilities; + } + + /** + * Get the resourceUri value. + * + * @return the resourceUri value + */ + public String resourceUri() { + return this.resourceUri; + } + + /** + * Get the resourceMetricDefinitionId value. + * + * @return the resourceMetricDefinitionId value + */ + public String resourceMetricDefinitionId() { + return this.resourceMetricDefinitionId; + } + + /** + * Get the properties value. + * + * @return the properties value + */ + public Map properties() { + return this.properties; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ResourceMetricInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ResourceMetricInner.java new file mode 100644 index 00000000000..d7ba11a4720 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ResourceMetricInner.java @@ -0,0 +1,157 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.ResourceMetricName; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.web.ResourceMetricValue; +import com.microsoft.azure.management.web.ResourceMetricProperty; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Object representing a metric for any resource . + */ +public class ResourceMetricInner { + /** + * Name of metric. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private ResourceMetricName name; + + /** + * Metric unit. + */ + @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) + private String unit; + + /** + * Metric granularity. E.g PT1H, PT5M, P1D. + */ + @JsonProperty(value = "timeGrain", access = JsonProperty.Access.WRITE_ONLY) + private String timeGrain; + + /** + * Metric start time. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startTime; + + /** + * Metric end time. + */ + @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endTime; + + /** + * Metric resource Id. + */ + @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) + private String resourceId; + + /** + * Resource Id. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Metric values. + */ + @JsonProperty(value = "metricValues", access = JsonProperty.Access.WRITE_ONLY) + private List metricValues; + + /** + * Resource metric properties collection. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private List properties; + + /** + * Get the name value. + * + * @return the name value + */ + public ResourceMetricName name() { + return this.name; + } + + /** + * Get the unit value. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Get the timeGrain value. + * + * @return the timeGrain value + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Get the startTime value. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime value. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Get the resourceId value. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get the metricValues value. + * + * @return the metricValues value + */ + public List metricValues() { + return this.metricValues; + } + + /** + * Get the properties value. + * + * @return the properties value + */ + public List properties() { + return this.properties; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ResourceNameAvailabilityInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ResourceNameAvailabilityInner.java new file mode 100644 index 00000000000..fb17a7c26bd --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ResourceNameAvailabilityInner.java @@ -0,0 +1,106 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.microsoft.azure.management.web.InAvailabilityReasonType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information regarding availbility of a resource name. + */ +public class ResourceNameAvailabilityInner { + /** + * <code>true</code> indicates name is valid and available. + * <code>false</code> indicates the name is invalid, + * unavailable, or both. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /** + * <code>Invalid</code> indicates the name provided does not + * match Azure App Service naming requirements. + * <code>AlreadyExists</code> indicates that the name is + * already in use and is therefore unavailable. Possible values include: + * 'Invalid', 'AlreadyExists'. + */ + @JsonProperty(value = "reason") + private InAvailabilityReasonType reason; + + /** + * If reason == invalid, provide the user with the reason why the given + * name is invalid, and provide the resource naming requirements so that + * the user can select a valid name. If reason == AlreadyExists, explain + * that resource name is already in use, and direct them to select a + * different name. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the nameAvailable value. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set the nameAvailable value. + * + * @param nameAvailable the nameAvailable value to set + * @return the ResourceNameAvailabilityInner object itself. + */ + public ResourceNameAvailabilityInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason value. + * + * @return the reason value + */ + public InAvailabilityReasonType reason() { + return this.reason; + } + + /** + * Set the reason value. + * + * @param reason the reason value to set + * @return the ResourceNameAvailabilityInner object itself. + */ + public ResourceNameAvailabilityInner withReason(InAvailabilityReasonType reason) { + this.reason = reason; + 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 ResourceNameAvailabilityInner object itself. + */ + public ResourceNameAvailabilityInner withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RestoreRequestInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RestoreRequestInner.java new file mode 100644 index 00000000000..952befe09c4 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RestoreRequestInner.java @@ -0,0 +1,320 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.microsoft.azure.management.web.DatabaseBackupSetting; +import com.microsoft.azure.management.web.BackupRestoreOperationType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Description of a restore request. + */ +@JsonFlatten +public class RestoreRequestInner extends ProxyOnlyResource { + /** + * SAS URL to the container. + */ + @JsonProperty(value = "properties.storageAccountUrl", required = true) + private String storageAccountUrl; + + /** + * Name of a blob which contains the backup. + */ + @JsonProperty(value = "properties.blobName") + private String blobName; + + /** + * <code>true</code> if the restore operation can overwrite + * target app; otherwise, <code>false</code>. + * <code>true</code> is needed if trying to restore over an + * existing app. + */ + @JsonProperty(value = "properties.overwrite", required = true) + private boolean overwrite; + + /** + * Name of an app. + */ + @JsonProperty(value = "properties.siteName") + private String siteName; + + /** + * Collection of databases which should be restored. This list has to match + * the list of databases included in the backup. + */ + @JsonProperty(value = "properties.databases") + private List databases; + + /** + * Changes a logic when restoring an app with custom domains. + * <code>true</code> to remove custom domains automatically. If + * <code>false</code>, custom domains are added to + * the app's object when it is being restored, but that might fail due to + * conflicts during the operation. + */ + @JsonProperty(value = "properties.ignoreConflictingHostNames") + private Boolean ignoreConflictingHostNames; + + /** + * Ignore the databases and only restore the site content. + */ + @JsonProperty(value = "properties.ignoreDatabases") + private Boolean ignoreDatabases; + + /** + * Specify app service plan that will own restored site. + */ + @JsonProperty(value = "properties.appServicePlan") + private String appServicePlan; + + /** + * Operation type. Possible values include: 'Default', 'Clone', + * 'Relocation', 'Snapshot'. + */ + @JsonProperty(value = "properties.operationType") + private BackupRestoreOperationType operationType; + + /** + * <code>true</code> if SiteConfig.ConnectionStrings should be + * set in new app; otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.adjustConnectionStrings") + private Boolean adjustConnectionStrings; + + /** + * App Service Environment name, if needed (only when restoring an app to + * an App Service Environment). + */ + @JsonProperty(value = "properties.hostingEnvironment") + private String hostingEnvironment; + + /** + * Get the storageAccountUrl value. + * + * @return the storageAccountUrl value + */ + public String storageAccountUrl() { + return this.storageAccountUrl; + } + + /** + * Set the storageAccountUrl value. + * + * @param storageAccountUrl the storageAccountUrl value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withStorageAccountUrl(String storageAccountUrl) { + this.storageAccountUrl = storageAccountUrl; + return this; + } + + /** + * Get the blobName value. + * + * @return the blobName value + */ + public String blobName() { + return this.blobName; + } + + /** + * Set the blobName value. + * + * @param blobName the blobName value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withBlobName(String blobName) { + this.blobName = blobName; + return this; + } + + /** + * Get the overwrite value. + * + * @return the overwrite value + */ + public boolean overwrite() { + return this.overwrite; + } + + /** + * Set the overwrite value. + * + * @param overwrite the overwrite value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withOverwrite(boolean overwrite) { + this.overwrite = overwrite; + return this; + } + + /** + * Get the siteName value. + * + * @return the siteName value + */ + public String siteName() { + return this.siteName; + } + + /** + * Set the siteName value. + * + * @param siteName the siteName value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withSiteName(String siteName) { + this.siteName = siteName; + return this; + } + + /** + * Get the databases value. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Set the databases value. + * + * @param databases the databases value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withDatabases(List databases) { + this.databases = databases; + return this; + } + + /** + * Get the ignoreConflictingHostNames value. + * + * @return the ignoreConflictingHostNames value + */ + public Boolean ignoreConflictingHostNames() { + return this.ignoreConflictingHostNames; + } + + /** + * Set the ignoreConflictingHostNames value. + * + * @param ignoreConflictingHostNames the ignoreConflictingHostNames value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withIgnoreConflictingHostNames(Boolean ignoreConflictingHostNames) { + this.ignoreConflictingHostNames = ignoreConflictingHostNames; + return this; + } + + /** + * Get the ignoreDatabases value. + * + * @return the ignoreDatabases value + */ + public Boolean ignoreDatabases() { + return this.ignoreDatabases; + } + + /** + * Set the ignoreDatabases value. + * + * @param ignoreDatabases the ignoreDatabases value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withIgnoreDatabases(Boolean ignoreDatabases) { + this.ignoreDatabases = ignoreDatabases; + return this; + } + + /** + * Get the appServicePlan value. + * + * @return the appServicePlan value + */ + public String appServicePlan() { + return this.appServicePlan; + } + + /** + * Set the appServicePlan value. + * + * @param appServicePlan the appServicePlan value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withAppServicePlan(String appServicePlan) { + this.appServicePlan = appServicePlan; + return this; + } + + /** + * Get the operationType value. + * + * @return the operationType value + */ + public BackupRestoreOperationType operationType() { + return this.operationType; + } + + /** + * Set the operationType value. + * + * @param operationType the operationType value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withOperationType(BackupRestoreOperationType operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get the adjustConnectionStrings value. + * + * @return the adjustConnectionStrings value + */ + public Boolean adjustConnectionStrings() { + return this.adjustConnectionStrings; + } + + /** + * Set the adjustConnectionStrings value. + * + * @param adjustConnectionStrings the adjustConnectionStrings value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withAdjustConnectionStrings(Boolean adjustConnectionStrings) { + this.adjustConnectionStrings = adjustConnectionStrings; + 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 RestoreRequestInner object itself. + */ + public RestoreRequestInner withHostingEnvironment(String hostingEnvironment) { + this.hostingEnvironment = hostingEnvironment; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RestoreResponseInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RestoreResponseInner.java new file mode 100644 index 00000000000..006447ac462 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/RestoreResponseInner.java @@ -0,0 +1,36 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Response for an app restore request. + */ +@JsonFlatten +public class RestoreResponseInner extends ProxyOnlyResource { + /** + * When server starts the restore process, it will return an operation ID + * identifying that particular restore operation. + */ + @JsonProperty(value = "properties.operationId", access = JsonProperty.Access.WRITE_ONLY) + private String operationId; + + /** + * Get the operationId value. + * + * @return the operationId value + */ + public String operationId() { + return this.operationId; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteAuthSettingsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteAuthSettingsInner.java new file mode 100644 index 00000000000..06ad69e46d6 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteAuthSettingsInner.java @@ -0,0 +1,705 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.UnauthenticatedClientAction; +import java.util.List; +import com.microsoft.azure.management.web.BuiltInAuthenticationProvider; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Configuration settings for the Azure App Service Authentication / + * Authorization feature. + */ +@JsonFlatten +public class SiteAuthSettingsInner extends ProxyOnlyResource { + /** + * <code>true</code> if the Authentication / Authorization + * feature is enabled for the current app; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.enabled") + private Boolean enabled; + + /** + * The RuntimeVersion of the Authentication / Authorization feature in use + * for the current app. + * The setting in this value can control the behavior of certain features + * in the Authentication / Authorization module. + */ + @JsonProperty(value = "properties.runtimeVersion") + private String runtimeVersion; + + /** + * The action to take when an unauthenticated client attempts to access the + * app. Possible values include: 'RedirectToLoginPage', 'AllowAnonymous'. + */ + @JsonProperty(value = "properties.unauthenticatedClientAction") + private UnauthenticatedClientAction unauthenticatedClientAction; + + /** + * <code>true</code> to durably store platform-specific + * security tokens that are obtained during login flows; otherwise, + * <code>false</code>. + * The default is <code>false</code>. + */ + @JsonProperty(value = "properties.tokenStoreEnabled") + private Boolean tokenStoreEnabled; + + /** + * External URLs that can be redirected to as part of logging in or logging + * out of the app. Note that the query string part of the URL is ignored. + * This is an advanced setting typically only needed by Windows Store + * application backends. + * Note that URLs within the current domain are always implicitly allowed. + */ + @JsonProperty(value = "properties.allowedExternalRedirectUrls") + private List allowedExternalRedirectUrls; + + /** + * The default authentication provider to use when multiple providers are + * configured. + * This setting is only needed if multiple providers are configured and the + * unauthenticated client + * action is set to "RedirectToLoginPage". Possible values include: + * 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount', + * 'Twitter'. + */ + @JsonProperty(value = "properties.defaultProvider") + private BuiltInAuthenticationProvider defaultProvider; + + /** + * The number of hours after session token expiration that a session token + * can be used to + * call the token refresh API. The default is 72 hours. + */ + @JsonProperty(value = "properties.tokenRefreshExtensionHours") + private Double tokenRefreshExtensionHours; + + /** + * The Client ID of this relying party application, known as the client_id. + * This setting is required for enabling OpenID Connection authentication + * with Azure Active Directory or + * other 3rd party OpenID Connect providers. + * More information on OpenID Connect: + * http://openid.net/specs/openid-connect-core-1_0.html. + */ + @JsonProperty(value = "properties.clientId") + private String clientId; + + /** + * The Client Secret of this relying party application (in Azure Active + * Directory, this is also referred to as the Key). + * This setting is optional. If no client secret is configured, the OpenID + * Connect implicit auth flow is used to authenticate end users. + * Otherwise, the OpenID Connect Authorization Code Flow is used to + * authenticate end users. + * More information on OpenID Connect: + * http://openid.net/specs/openid-connect-core-1_0.html. + */ + @JsonProperty(value = "properties.clientSecret") + private String clientSecret; + + /** + * The OpenID Connect Issuer URI that represents the entity which issues + * access tokens for this application. + * When using Azure Active Directory, this value is the URI of the + * directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. + * This URI is a case-sensitive identifier for the token issuer. + * More information on OpenID Connect Discovery: + * http://openid.net/specs/openid-connect-discovery-1_0.html. + */ + @JsonProperty(value = "properties.issuer") + private String issuer; + + /** + * Allowed audience values to consider when validating JWTs issued by + * Azure Active Directory. Note that the <code>ClientID</code> + * value is always considered an + * allowed audience, regardless of this setting. + */ + @JsonProperty(value = "properties.allowedAudiences") + private List allowedAudiences; + + /** + * Login parameters to send to the OpenID Connect authorization endpoint + * when + * a user logs in. Each parameter must be in the form "key=value". + */ + @JsonProperty(value = "properties.additionalLoginParams") + private List additionalLoginParams; + + /** + * The OpenID Connect Client ID for the Google web application. + * This setting is required for enabling Google Sign-In. + * Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + */ + @JsonProperty(value = "properties.googleClientId") + private String googleClientId; + + /** + * The client secret associated with the Google web application. + * This setting is required for enabling Google Sign-In. + * Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + */ + @JsonProperty(value = "properties.googleClientSecret") + private String googleClientSecret; + + /** + * The OAuth 2.0 scopes that will be requested as part of Google Sign-In + * authentication. + * This setting is optional. If not specified, "openid", "profile", and + * "email" are used as default scopes. + * Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + */ + @JsonProperty(value = "properties.googleOAuthScopes") + private List googleOAuthScopes; + + /** + * The App ID of the Facebook app used for login. + * This setting is required for enabling Facebook Login. + * Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + */ + @JsonProperty(value = "properties.facebookAppId") + private String facebookAppId; + + /** + * The App Secret of the Facebook app used for Facebook Login. + * This setting is required for enabling Facebook Login. + * Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + */ + @JsonProperty(value = "properties.facebookAppSecret") + private String facebookAppSecret; + + /** + * The OAuth 2.0 scopes that will be requested as part of Facebook Login + * authentication. + * This setting is optional. + * Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + */ + @JsonProperty(value = "properties.facebookOAuthScopes") + private List facebookOAuthScopes; + + /** + * The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. + * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in. + */ + @JsonProperty(value = "properties.twitterConsumerKey") + private String twitterConsumerKey; + + /** + * The OAuth 1.0a consumer secret of the Twitter application used for + * sign-in. + * This setting is required for enabling Twitter Sign-In. + * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in. + */ + @JsonProperty(value = "properties.twitterConsumerSecret") + private String twitterConsumerSecret; + + /** + * The OAuth 2.0 client ID that was created for the app used for + * authentication. + * This setting is required for enabling Microsoft Account authentication. + * Microsoft Account OAuth documentation: + * https://dev.onedrive.com/auth/msa_oauth.htm. + */ + @JsonProperty(value = "properties.microsoftAccountClientId") + private String microsoftAccountClientId; + + /** + * The OAuth 2.0 client secret that was created for the app used for + * authentication. + * This setting is required for enabling Microsoft Account authentication. + * Microsoft Account OAuth documentation: + * https://dev.onedrive.com/auth/msa_oauth.htm. + */ + @JsonProperty(value = "properties.microsoftAccountClientSecret") + private String microsoftAccountClientSecret; + + /** + * The OAuth 2.0 scopes that will be requested as part of Microsoft Account + * authentication. + * This setting is optional. If not specified, "wl.basic" is used as the + * default scope. + * Microsoft Account Scopes and permissions documentation: + * https://msdn.microsoft.com/en-us/library/dn631845.aspx. + */ + @JsonProperty(value = "properties.microsoftAccountOAuthScopes") + private List microsoftAccountOAuthScopes; + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the runtimeVersion value. + * + * @return the runtimeVersion value + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion value. + * + * @param runtimeVersion the runtimeVersion value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get the unauthenticatedClientAction value. + * + * @return the unauthenticatedClientAction value + */ + public UnauthenticatedClientAction unauthenticatedClientAction() { + return this.unauthenticatedClientAction; + } + + /** + * Set the unauthenticatedClientAction value. + * + * @param unauthenticatedClientAction the unauthenticatedClientAction value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withUnauthenticatedClientAction(UnauthenticatedClientAction unauthenticatedClientAction) { + this.unauthenticatedClientAction = unauthenticatedClientAction; + return this; + } + + /** + * Get the tokenStoreEnabled value. + * + * @return the tokenStoreEnabled value + */ + public Boolean tokenStoreEnabled() { + return this.tokenStoreEnabled; + } + + /** + * Set the tokenStoreEnabled value. + * + * @param tokenStoreEnabled the tokenStoreEnabled value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTokenStoreEnabled(Boolean tokenStoreEnabled) { + this.tokenStoreEnabled = tokenStoreEnabled; + return this; + } + + /** + * Get the allowedExternalRedirectUrls value. + * + * @return the allowedExternalRedirectUrls value + */ + public List allowedExternalRedirectUrls() { + return this.allowedExternalRedirectUrls; + } + + /** + * Set the allowedExternalRedirectUrls value. + * + * @param allowedExternalRedirectUrls the allowedExternalRedirectUrls value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withAllowedExternalRedirectUrls(List allowedExternalRedirectUrls) { + this.allowedExternalRedirectUrls = allowedExternalRedirectUrls; + return this; + } + + /** + * Get the defaultProvider value. + * + * @return the defaultProvider value + */ + public BuiltInAuthenticationProvider defaultProvider() { + return this.defaultProvider; + } + + /** + * Set the defaultProvider value. + * + * @param defaultProvider the defaultProvider value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withDefaultProvider(BuiltInAuthenticationProvider defaultProvider) { + this.defaultProvider = defaultProvider; + return this; + } + + /** + * Get the tokenRefreshExtensionHours value. + * + * @return the tokenRefreshExtensionHours value + */ + public Double tokenRefreshExtensionHours() { + return this.tokenRefreshExtensionHours; + } + + /** + * Set the tokenRefreshExtensionHours value. + * + * @param tokenRefreshExtensionHours the tokenRefreshExtensionHours value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTokenRefreshExtensionHours(Double tokenRefreshExtensionHours) { + this.tokenRefreshExtensionHours = tokenRefreshExtensionHours; + return this; + } + + /** + * Get the clientId value. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId value. + * + * @param clientId the clientId value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the clientSecret value. + * + * @return the clientSecret value + */ + public String clientSecret() { + return this.clientSecret; + } + + /** + * Set the clientSecret value. + * + * @param clientSecret the clientSecret value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Get the issuer value. + * + * @return the issuer value + */ + public String issuer() { + return this.issuer; + } + + /** + * Set the issuer value. + * + * @param issuer the issuer value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withIssuer(String issuer) { + this.issuer = issuer; + return this; + } + + /** + * Get the allowedAudiences value. + * + * @return the allowedAudiences value + */ + public List allowedAudiences() { + return this.allowedAudiences; + } + + /** + * Set the allowedAudiences value. + * + * @param allowedAudiences the allowedAudiences value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withAllowedAudiences(List allowedAudiences) { + this.allowedAudiences = allowedAudiences; + return this; + } + + /** + * Get the additionalLoginParams value. + * + * @return the additionalLoginParams value + */ + public List additionalLoginParams() { + return this.additionalLoginParams; + } + + /** + * Set the additionalLoginParams value. + * + * @param additionalLoginParams the additionalLoginParams value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withAdditionalLoginParams(List additionalLoginParams) { + this.additionalLoginParams = additionalLoginParams; + return this; + } + + /** + * Get the googleClientId value. + * + * @return the googleClientId value + */ + public String googleClientId() { + return this.googleClientId; + } + + /** + * Set the googleClientId value. + * + * @param googleClientId the googleClientId value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGoogleClientId(String googleClientId) { + this.googleClientId = googleClientId; + return this; + } + + /** + * Get the googleClientSecret value. + * + * @return the googleClientSecret value + */ + public String googleClientSecret() { + return this.googleClientSecret; + } + + /** + * Set the googleClientSecret value. + * + * @param googleClientSecret the googleClientSecret value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGoogleClientSecret(String googleClientSecret) { + this.googleClientSecret = googleClientSecret; + return this; + } + + /** + * Get the googleOAuthScopes value. + * + * @return the googleOAuthScopes value + */ + public List googleOAuthScopes() { + return this.googleOAuthScopes; + } + + /** + * Set the googleOAuthScopes value. + * + * @param googleOAuthScopes the googleOAuthScopes value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGoogleOAuthScopes(List googleOAuthScopes) { + this.googleOAuthScopes = googleOAuthScopes; + return this; + } + + /** + * Get the facebookAppId value. + * + * @return the facebookAppId value + */ + public String facebookAppId() { + return this.facebookAppId; + } + + /** + * Set the facebookAppId value. + * + * @param facebookAppId the facebookAppId value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withFacebookAppId(String facebookAppId) { + this.facebookAppId = facebookAppId; + return this; + } + + /** + * Get the facebookAppSecret value. + * + * @return the facebookAppSecret value + */ + public String facebookAppSecret() { + return this.facebookAppSecret; + } + + /** + * Set the facebookAppSecret value. + * + * @param facebookAppSecret the facebookAppSecret value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withFacebookAppSecret(String facebookAppSecret) { + this.facebookAppSecret = facebookAppSecret; + return this; + } + + /** + * Get the facebookOAuthScopes value. + * + * @return the facebookOAuthScopes value + */ + public List facebookOAuthScopes() { + return this.facebookOAuthScopes; + } + + /** + * Set the facebookOAuthScopes value. + * + * @param facebookOAuthScopes the facebookOAuthScopes value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withFacebookOAuthScopes(List facebookOAuthScopes) { + this.facebookOAuthScopes = facebookOAuthScopes; + return this; + } + + /** + * Get the twitterConsumerKey value. + * + * @return the twitterConsumerKey value + */ + public String twitterConsumerKey() { + return this.twitterConsumerKey; + } + + /** + * Set the twitterConsumerKey value. + * + * @param twitterConsumerKey the twitterConsumerKey value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTwitterConsumerKey(String twitterConsumerKey) { + this.twitterConsumerKey = twitterConsumerKey; + return this; + } + + /** + * Get the twitterConsumerSecret value. + * + * @return the twitterConsumerSecret value + */ + public String twitterConsumerSecret() { + return this.twitterConsumerSecret; + } + + /** + * Set the twitterConsumerSecret value. + * + * @param twitterConsumerSecret the twitterConsumerSecret value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTwitterConsumerSecret(String twitterConsumerSecret) { + this.twitterConsumerSecret = twitterConsumerSecret; + return this; + } + + /** + * Get the microsoftAccountClientId value. + * + * @return the microsoftAccountClientId value + */ + public String microsoftAccountClientId() { + return this.microsoftAccountClientId; + } + + /** + * Set the microsoftAccountClientId value. + * + * @param microsoftAccountClientId the microsoftAccountClientId value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withMicrosoftAccountClientId(String microsoftAccountClientId) { + this.microsoftAccountClientId = microsoftAccountClientId; + return this; + } + + /** + * Get the microsoftAccountClientSecret value. + * + * @return the microsoftAccountClientSecret value + */ + public String microsoftAccountClientSecret() { + return this.microsoftAccountClientSecret; + } + + /** + * Set the microsoftAccountClientSecret value. + * + * @param microsoftAccountClientSecret the microsoftAccountClientSecret value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withMicrosoftAccountClientSecret(String microsoftAccountClientSecret) { + this.microsoftAccountClientSecret = microsoftAccountClientSecret; + return this; + } + + /** + * Get the microsoftAccountOAuthScopes value. + * + * @return the microsoftAccountOAuthScopes value + */ + public List microsoftAccountOAuthScopes() { + return this.microsoftAccountOAuthScopes; + } + + /** + * Set the microsoftAccountOAuthScopes value. + * + * @param microsoftAccountOAuthScopes the microsoftAccountOAuthScopes value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withMicrosoftAccountOAuthScopes(List microsoftAccountOAuthScopes) { + this.microsoftAccountOAuthScopes = microsoftAccountOAuthScopes; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteCloneabilityInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteCloneabilityInner.java new file mode 100644 index 00000000000..0b2e85d5fc2 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteCloneabilityInner.java @@ -0,0 +1,127 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.CloneAbilityResult; +import java.util.List; +import com.microsoft.azure.management.web.SiteCloneabilityCriterion; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Represents whether or not an app is cloneable. + */ +public class SiteCloneabilityInner { + /** + * Name of app. Possible values include: 'Cloneable', 'PartiallyCloneable', + * 'NotCloneable'. + */ + @JsonProperty(value = "result") + private CloneAbilityResult result; + + /** + * List of features enabled on app that prevent cloning. + */ + @JsonProperty(value = "blockingFeatures") + private List blockingFeatures; + + /** + * List of features enabled on app that are non-blocking but cannot be + * cloned. The app can still be cloned + * but the features in this list will not be set up on cloned app. + */ + @JsonProperty(value = "unsupportedFeatures") + private List unsupportedFeatures; + + /** + * List of blocking application characteristics. + */ + @JsonProperty(value = "blockingCharacteristics") + private List blockingCharacteristics; + + /** + * Get the result value. + * + * @return the result value + */ + public CloneAbilityResult result() { + return this.result; + } + + /** + * Set the result value. + * + * @param result the result value to set + * @return the SiteCloneabilityInner object itself. + */ + public SiteCloneabilityInner withResult(CloneAbilityResult result) { + this.result = result; + return this; + } + + /** + * Get the blockingFeatures value. + * + * @return the blockingFeatures value + */ + public List blockingFeatures() { + return this.blockingFeatures; + } + + /** + * Set the blockingFeatures value. + * + * @param blockingFeatures the blockingFeatures value to set + * @return the SiteCloneabilityInner object itself. + */ + public SiteCloneabilityInner withBlockingFeatures(List blockingFeatures) { + this.blockingFeatures = blockingFeatures; + return this; + } + + /** + * Get the unsupportedFeatures value. + * + * @return the unsupportedFeatures value + */ + public List unsupportedFeatures() { + return this.unsupportedFeatures; + } + + /** + * Set the unsupportedFeatures value. + * + * @param unsupportedFeatures the unsupportedFeatures value to set + * @return the SiteCloneabilityInner object itself. + */ + public SiteCloneabilityInner withUnsupportedFeatures(List unsupportedFeatures) { + this.unsupportedFeatures = unsupportedFeatures; + return this; + } + + /** + * Get the blockingCharacteristics value. + * + * @return the blockingCharacteristics value + */ + public List blockingCharacteristics() { + return this.blockingCharacteristics; + } + + /** + * Set the blockingCharacteristics value. + * + * @param blockingCharacteristics the blockingCharacteristics value to set + * @return the SiteCloneabilityInner object itself. + */ + public SiteCloneabilityInner withBlockingCharacteristics(List blockingCharacteristics) { + this.blockingCharacteristics = blockingCharacteristics; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteConfigResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteConfigResourceInner.java new file mode 100644 index 00000000000..ffb1888c86a --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteConfigResourceInner.java @@ -0,0 +1,1211 @@ +/** + * 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.web.implementation; + +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.NameValuePair; +import com.microsoft.azure.management.web.ConnStringInfo; +import com.microsoft.azure.management.web.SiteMachineKey; +import com.microsoft.azure.management.web.HandlerMapping; +import com.microsoft.azure.management.web.ScmType; +import com.microsoft.azure.management.web.ManagedPipelineMode; +import com.microsoft.azure.management.web.VirtualApplication; +import com.microsoft.azure.management.web.SiteLoadBalancing; +import com.microsoft.azure.management.web.Experiments; +import com.microsoft.azure.management.web.SiteLimits; +import com.microsoft.azure.management.web.AutoHealRules; +import com.microsoft.azure.management.web.CorsSettings; +import com.microsoft.azure.management.web.ApiDefinitionInfo; +import com.microsoft.azure.management.web.IpSecurityRestriction; +import com.microsoft.azure.management.web.SupportedTlsVersions; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Web app configuration ARM resource. + */ +@JsonFlatten +public class SiteConfigResourceInner extends ProxyOnlyResource { + /** + * Number of workers. + */ + @JsonProperty(value = "properties.numberOfWorkers") + private Integer numberOfWorkers; + + /** + * Default documents. + */ + @JsonProperty(value = "properties.defaultDocuments") + private List defaultDocuments; + + /** + * .NET Framework version. + */ + @JsonProperty(value = "properties.netFrameworkVersion") + private String netFrameworkVersion; + + /** + * Version of PHP. + */ + @JsonProperty(value = "properties.phpVersion") + private String phpVersion; + + /** + * Version of Python. + */ + @JsonProperty(value = "properties.pythonVersion") + private String pythonVersion; + + /** + * Version of Node.js. + */ + @JsonProperty(value = "properties.nodeVersion") + private String nodeVersion; + + /** + * Linux App Framework and version. + */ + @JsonProperty(value = "properties.linuxFxVersion") + private String linuxFxVersion; + + /** + * <code>true</code> if request tracing is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.requestTracingEnabled") + private Boolean requestTracingEnabled; + + /** + * Request tracing expiration time. + */ + @JsonProperty(value = "properties.requestTracingExpirationTime") + private DateTime requestTracingExpirationTime; + + /** + * <code>true</code> if remote debugging is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.remoteDebuggingEnabled") + private Boolean remoteDebuggingEnabled; + + /** + * Remote debugging version. + */ + @JsonProperty(value = "properties.remoteDebuggingVersion") + private String remoteDebuggingVersion; + + /** + * <code>true</code> if HTTP logging is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.httpLoggingEnabled") + private Boolean httpLoggingEnabled; + + /** + * HTTP logs directory size limit. + */ + @JsonProperty(value = "properties.logsDirectorySizeLimit") + private Integer logsDirectorySizeLimit; + + /** + * <code>true</code> if detailed error logging is enabled; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.detailedErrorLoggingEnabled") + private Boolean detailedErrorLoggingEnabled; + + /** + * Publishing user name. + */ + @JsonProperty(value = "properties.publishingUsername") + private String publishingUsername; + + /** + * Application settings. + */ + @JsonProperty(value = "properties.appSettings") + private List appSettings; + + /** + * Connection strings. + */ + @JsonProperty(value = "properties.connectionStrings") + private List connectionStrings; + + /** + * Site MachineKey. + */ + @JsonProperty(value = "properties.machineKey", access = JsonProperty.Access.WRITE_ONLY) + private SiteMachineKey machineKey; + + /** + * Handler mappings. + */ + @JsonProperty(value = "properties.handlerMappings") + private List handlerMappings; + + /** + * Document root. + */ + @JsonProperty(value = "properties.documentRoot") + private String documentRoot; + + /** + * SCM type. Possible values include: 'None', 'Dropbox', 'Tfs', 'LocalGit', + * 'GitHub', 'CodePlexGit', 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', + * 'ExternalGit', 'ExternalHg', 'OneDrive', 'VSO'. + */ + @JsonProperty(value = "properties.scmType") + private ScmType scmType; + + /** + * <code>true</code> to use 32-bit worker process; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.use32BitWorkerProcess") + private Boolean use32BitWorkerProcess; + + /** + * <code>true</code> if WebSocket is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.webSocketsEnabled") + private Boolean webSocketsEnabled; + + /** + * <code>true</code> if Always On is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.alwaysOn") + private Boolean alwaysOn; + + /** + * Java version. + */ + @JsonProperty(value = "properties.javaVersion") + private String javaVersion; + + /** + * Java container. + */ + @JsonProperty(value = "properties.javaContainer") + private String javaContainer; + + /** + * Java container version. + */ + @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'. + */ + @JsonProperty(value = "properties.managedPipelineMode") + private ManagedPipelineMode managedPipelineMode; + + /** + * Virtual applications. + */ + @JsonProperty(value = "properties.virtualApplications") + private List virtualApplications; + + /** + * Site load balancing. Possible values include: 'WeightedRoundRobin', + * 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', + * 'RequestHash'. + */ + @JsonProperty(value = "properties.loadBalancing") + private SiteLoadBalancing loadBalancing; + + /** + * This is work around for polymophic types. + */ + @JsonProperty(value = "properties.experiments") + private Experiments experiments; + + /** + * Site limits. + */ + @JsonProperty(value = "properties.limits") + private SiteLimits limits; + + /** + * <code>true</code> if Auto Heal is enabled; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.autoHealEnabled") + private Boolean autoHealEnabled; + + /** + * Auto Heal rules. + */ + @JsonProperty(value = "properties.autoHealRules") + private AutoHealRules autoHealRules; + + /** + * Tracing options. + */ + @JsonProperty(value = "properties.tracingOptions") + private String tracingOptions; + + /** + * Virtual Network name. + */ + @JsonProperty(value = "properties.vnetName") + private String vnetName; + + /** + * Cross-Origin Resource Sharing (CORS) settings. + */ + @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 app. + */ + @JsonProperty(value = "properties.apiDefinition") + private ApiDefinitionInfo apiDefinition; + + /** + * Auto-swap slot name. + */ + @JsonProperty(value = "properties.autoSwapSlotName") + private String autoSwapSlotName; + + /** + * <code>true</code> to enable local MySQL; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.localMySqlEnabled") + private Boolean localMySqlEnabled; + + /** + * IP security restrictions. + */ + @JsonProperty(value = "properties.ipSecurityRestrictions") + private List ipSecurityRestrictions; + + /** + * Http20Enabled: configures a web site to allow clients to connect over + * http2.0. + */ + @JsonProperty(value = "properties.http20Enabled") + private Boolean http20Enabled; + + /** + * MinTlsVersion: configures the minimum version of TLS required for SSL + * requests. Possible values include: '1.0', '1.1', '1.2'. + */ + @JsonProperty(value = "properties.minTlsVersion") + private SupportedTlsVersions minTlsVersion; + + /** + * Get the numberOfWorkers value. + * + * @return the numberOfWorkers value + */ + public Integer numberOfWorkers() { + return this.numberOfWorkers; + } + + /** + * Set the numberOfWorkers value. + * + * @param numberOfWorkers the numberOfWorkers value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withNumberOfWorkers(Integer numberOfWorkers) { + this.numberOfWorkers = numberOfWorkers; + return this; + } + + /** + * Get the defaultDocuments value. + * + * @return the defaultDocuments value + */ + public List defaultDocuments() { + return this.defaultDocuments; + } + + /** + * Set the defaultDocuments value. + * + * @param defaultDocuments the defaultDocuments value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withDefaultDocuments(List defaultDocuments) { + this.defaultDocuments = defaultDocuments; + return this; + } + + /** + * Get the netFrameworkVersion value. + * + * @return the netFrameworkVersion value + */ + public String netFrameworkVersion() { + return this.netFrameworkVersion; + } + + /** + * Set the netFrameworkVersion value. + * + * @param netFrameworkVersion the netFrameworkVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withNetFrameworkVersion(String netFrameworkVersion) { + this.netFrameworkVersion = netFrameworkVersion; + return this; + } + + /** + * Get the phpVersion value. + * + * @return the phpVersion value + */ + public String phpVersion() { + return this.phpVersion; + } + + /** + * Set the phpVersion value. + * + * @param phpVersion the phpVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPhpVersion(String phpVersion) { + this.phpVersion = phpVersion; + return this; + } + + /** + * Get the pythonVersion value. + * + * @return the pythonVersion value + */ + public String pythonVersion() { + return this.pythonVersion; + } + + /** + * Set the pythonVersion value. + * + * @param pythonVersion the pythonVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPythonVersion(String pythonVersion) { + this.pythonVersion = 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 SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withNodeVersion(String nodeVersion) { + this.nodeVersion = nodeVersion; + return this; + } + + /** + * Get the linuxFxVersion value. + * + * @return the linuxFxVersion value + */ + public String linuxFxVersion() { + return this.linuxFxVersion; + } + + /** + * Set the linuxFxVersion value. + * + * @param linuxFxVersion the linuxFxVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLinuxFxVersion(String linuxFxVersion) { + this.linuxFxVersion = linuxFxVersion; + return this; + } + + /** + * Get the requestTracingEnabled value. + * + * @return the requestTracingEnabled value + */ + public Boolean requestTracingEnabled() { + return this.requestTracingEnabled; + } + + /** + * Set the requestTracingEnabled value. + * + * @param requestTracingEnabled the requestTracingEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRequestTracingEnabled(Boolean requestTracingEnabled) { + this.requestTracingEnabled = requestTracingEnabled; + return this; + } + + /** + * Get the requestTracingExpirationTime value. + * + * @return the requestTracingExpirationTime value + */ + public DateTime requestTracingExpirationTime() { + return this.requestTracingExpirationTime; + } + + /** + * Set the requestTracingExpirationTime value. + * + * @param requestTracingExpirationTime the requestTracingExpirationTime value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRequestTracingExpirationTime(DateTime requestTracingExpirationTime) { + this.requestTracingExpirationTime = requestTracingExpirationTime; + return this; + } + + /** + * Get the remoteDebuggingEnabled value. + * + * @return the remoteDebuggingEnabled value + */ + public Boolean remoteDebuggingEnabled() { + return this.remoteDebuggingEnabled; + } + + /** + * Set the remoteDebuggingEnabled value. + * + * @param remoteDebuggingEnabled the remoteDebuggingEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRemoteDebuggingEnabled(Boolean remoteDebuggingEnabled) { + this.remoteDebuggingEnabled = remoteDebuggingEnabled; + return this; + } + + /** + * Get the remoteDebuggingVersion value. + * + * @return the remoteDebuggingVersion value + */ + public String remoteDebuggingVersion() { + return this.remoteDebuggingVersion; + } + + /** + * Set the remoteDebuggingVersion value. + * + * @param remoteDebuggingVersion the remoteDebuggingVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRemoteDebuggingVersion(String remoteDebuggingVersion) { + this.remoteDebuggingVersion = remoteDebuggingVersion; + return this; + } + + /** + * Get the httpLoggingEnabled value. + * + * @return the httpLoggingEnabled value + */ + public Boolean httpLoggingEnabled() { + return this.httpLoggingEnabled; + } + + /** + * Set the httpLoggingEnabled value. + * + * @param httpLoggingEnabled the httpLoggingEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withHttpLoggingEnabled(Boolean httpLoggingEnabled) { + this.httpLoggingEnabled = httpLoggingEnabled; + return this; + } + + /** + * Get the logsDirectorySizeLimit value. + * + * @return the logsDirectorySizeLimit value + */ + public Integer logsDirectorySizeLimit() { + return this.logsDirectorySizeLimit; + } + + /** + * Set the logsDirectorySizeLimit value. + * + * @param logsDirectorySizeLimit the logsDirectorySizeLimit value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLogsDirectorySizeLimit(Integer logsDirectorySizeLimit) { + this.logsDirectorySizeLimit = logsDirectorySizeLimit; + return this; + } + + /** + * Get the detailedErrorLoggingEnabled value. + * + * @return the detailedErrorLoggingEnabled value + */ + public Boolean detailedErrorLoggingEnabled() { + return this.detailedErrorLoggingEnabled; + } + + /** + * Set the detailedErrorLoggingEnabled value. + * + * @param detailedErrorLoggingEnabled the detailedErrorLoggingEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withDetailedErrorLoggingEnabled(Boolean detailedErrorLoggingEnabled) { + this.detailedErrorLoggingEnabled = detailedErrorLoggingEnabled; + return this; + } + + /** + * Get the publishingUsername value. + * + * @return the publishingUsername value + */ + public String publishingUsername() { + return this.publishingUsername; + } + + /** + * Set the publishingUsername value. + * + * @param publishingUsername the publishingUsername value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPublishingUsername(String publishingUsername) { + this.publishingUsername = publishingUsername; + 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 SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAppSettings(List appSettings) { + this.appSettings = appSettings; + 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 SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withConnectionStrings(List connectionStrings) { + this.connectionStrings = connectionStrings; + return this; + } + + /** + * Get the machineKey value. + * + * @return the machineKey value + */ + public SiteMachineKey machineKey() { + return this.machineKey; + } + + /** + * Get the handlerMappings value. + * + * @return the handlerMappings value + */ + public List handlerMappings() { + return this.handlerMappings; + } + + /** + * Set the handlerMappings value. + * + * @param handlerMappings the handlerMappings value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withHandlerMappings(List handlerMappings) { + this.handlerMappings = handlerMappings; + return this; + } + + /** + * Get the documentRoot value. + * + * @return the documentRoot value + */ + public String documentRoot() { + return this.documentRoot; + } + + /** + * Set the documentRoot value. + * + * @param documentRoot the documentRoot value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withDocumentRoot(String documentRoot) { + this.documentRoot = documentRoot; + return this; + } + + /** + * Get the scmType value. + * + * @return the scmType value + */ + public ScmType scmType() { + return this.scmType; + } + + /** + * Set the scmType value. + * + * @param scmType the scmType value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withScmType(ScmType scmType) { + this.scmType = scmType; + return this; + } + + /** + * Get the use32BitWorkerProcess value. + * + * @return the use32BitWorkerProcess value + */ + public Boolean use32BitWorkerProcess() { + return this.use32BitWorkerProcess; + } + + /** + * Set the use32BitWorkerProcess value. + * + * @param use32BitWorkerProcess the use32BitWorkerProcess value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withUse32BitWorkerProcess(Boolean use32BitWorkerProcess) { + this.use32BitWorkerProcess = use32BitWorkerProcess; + return this; + } + + /** + * Get the webSocketsEnabled value. + * + * @return the webSocketsEnabled value + */ + public Boolean webSocketsEnabled() { + return this.webSocketsEnabled; + } + + /** + * Set the webSocketsEnabled value. + * + * @param webSocketsEnabled the webSocketsEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withWebSocketsEnabled(Boolean webSocketsEnabled) { + this.webSocketsEnabled = webSocketsEnabled; + return this; + } + + /** + * Get the alwaysOn value. + * + * @return the alwaysOn value + */ + public Boolean alwaysOn() { + return this.alwaysOn; + } + + /** + * Set the alwaysOn value. + * + * @param alwaysOn the alwaysOn value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAlwaysOn(Boolean alwaysOn) { + this.alwaysOn = alwaysOn; + return this; + } + + /** + * Get the javaVersion value. + * + * @return the javaVersion value + */ + public String javaVersion() { + return this.javaVersion; + } + + /** + * Set the javaVersion value. + * + * @param javaVersion the javaVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withJavaVersion(String javaVersion) { + this.javaVersion = javaVersion; + return this; + } + + /** + * Get the javaContainer value. + * + * @return the javaContainer value + */ + public String javaContainer() { + return this.javaContainer; + } + + /** + * Set the javaContainer value. + * + * @param javaContainer the javaContainer value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withJavaContainer(String javaContainer) { + this.javaContainer = javaContainer; + return this; + } + + /** + * Get the javaContainerVersion value. + * + * @return the javaContainerVersion value + */ + public String javaContainerVersion() { + return this.javaContainerVersion; + } + + /** + * Set the javaContainerVersion value. + * + * @param javaContainerVersion the javaContainerVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withJavaContainerVersion(String javaContainerVersion) { + this.javaContainerVersion = 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 SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAppCommandLine(String appCommandLine) { + this.appCommandLine = appCommandLine; + return this; + } + + /** + * Get the managedPipelineMode value. + * + * @return the managedPipelineMode value + */ + public ManagedPipelineMode managedPipelineMode() { + return this.managedPipelineMode; + } + + /** + * Set the managedPipelineMode value. + * + * @param managedPipelineMode the managedPipelineMode value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withManagedPipelineMode(ManagedPipelineMode managedPipelineMode) { + this.managedPipelineMode = managedPipelineMode; + return this; + } + + /** + * Get the virtualApplications value. + * + * @return the virtualApplications value + */ + public List virtualApplications() { + return this.virtualApplications; + } + + /** + * Set the virtualApplications value. + * + * @param virtualApplications the virtualApplications value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withVirtualApplications(List virtualApplications) { + this.virtualApplications = virtualApplications; + return this; + } + + /** + * Get the loadBalancing value. + * + * @return the loadBalancing value + */ + public SiteLoadBalancing loadBalancing() { + return this.loadBalancing; + } + + /** + * Set the loadBalancing value. + * + * @param loadBalancing the loadBalancing value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLoadBalancing(SiteLoadBalancing loadBalancing) { + this.loadBalancing = loadBalancing; + return this; + } + + /** + * Get the experiments value. + * + * @return the experiments value + */ + public Experiments experiments() { + return this.experiments; + } + + /** + * Set the experiments value. + * + * @param experiments the experiments value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withExperiments(Experiments experiments) { + this.experiments = experiments; + return this; + } + + /** + * Get the limits value. + * + * @return the limits value + */ + public SiteLimits limits() { + return this.limits; + } + + /** + * Set the limits value. + * + * @param limits the limits value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLimits(SiteLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get the autoHealEnabled value. + * + * @return the autoHealEnabled value + */ + public Boolean autoHealEnabled() { + return this.autoHealEnabled; + } + + /** + * Set the autoHealEnabled value. + * + * @param autoHealEnabled the autoHealEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAutoHealEnabled(Boolean autoHealEnabled) { + this.autoHealEnabled = autoHealEnabled; + return this; + } + + /** + * Get the autoHealRules value. + * + * @return the autoHealRules value + */ + public AutoHealRules autoHealRules() { + return this.autoHealRules; + } + + /** + * Set the autoHealRules value. + * + * @param autoHealRules the autoHealRules value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAutoHealRules(AutoHealRules autoHealRules) { + this.autoHealRules = autoHealRules; + return this; + } + + /** + * Get the tracingOptions value. + * + * @return the tracingOptions value + */ + public String tracingOptions() { + return this.tracingOptions; + } + + /** + * Set the tracingOptions value. + * + * @param tracingOptions the tracingOptions value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withTracingOptions(String tracingOptions) { + this.tracingOptions = tracingOptions; + return this; + } + + /** + * Get the vnetName value. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the vnetName value. + * + * @param vnetName the vnetName value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the cors value. + * + * @return the cors value + */ + public CorsSettings cors() { + return this.cors; + } + + /** + * Set the cors value. + * + * @param cors the cors value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withCors(CorsSettings cors) { + this.cors = 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 SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPush(PushSettingsInner push) { + this.push = push; + return this; + } + + /** + * Get the apiDefinition value. + * + * @return the apiDefinition value + */ + public ApiDefinitionInfo apiDefinition() { + return this.apiDefinition; + } + + /** + * Set the apiDefinition value. + * + * @param apiDefinition the apiDefinition value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withApiDefinition(ApiDefinitionInfo apiDefinition) { + this.apiDefinition = apiDefinition; + return this; + } + + /** + * Get the autoSwapSlotName value. + * + * @return the autoSwapSlotName value + */ + public String autoSwapSlotName() { + return this.autoSwapSlotName; + } + + /** + * Set the autoSwapSlotName value. + * + * @param autoSwapSlotName the autoSwapSlotName value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAutoSwapSlotName(String autoSwapSlotName) { + this.autoSwapSlotName = autoSwapSlotName; + return this; + } + + /** + * Get the localMySqlEnabled value. + * + * @return the localMySqlEnabled value + */ + public Boolean localMySqlEnabled() { + return this.localMySqlEnabled; + } + + /** + * Set the localMySqlEnabled value. + * + * @param localMySqlEnabled the localMySqlEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLocalMySqlEnabled(Boolean localMySqlEnabled) { + this.localMySqlEnabled = localMySqlEnabled; + return this; + } + + /** + * Get the ipSecurityRestrictions value. + * + * @return the ipSecurityRestrictions value + */ + public List ipSecurityRestrictions() { + return this.ipSecurityRestrictions; + } + + /** + * Set the ipSecurityRestrictions value. + * + * @param ipSecurityRestrictions the ipSecurityRestrictions value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withIpSecurityRestrictions(List ipSecurityRestrictions) { + this.ipSecurityRestrictions = ipSecurityRestrictions; + return this; + } + + /** + * Get the http20Enabled value. + * + * @return the http20Enabled value + */ + public Boolean http20Enabled() { + return this.http20Enabled; + } + + /** + * Set the http20Enabled value. + * + * @param http20Enabled the http20Enabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withHttp20Enabled(Boolean http20Enabled) { + this.http20Enabled = http20Enabled; + return this; + } + + /** + * Get the minTlsVersion value. + * + * @return the minTlsVersion value + */ + public SupportedTlsVersions minTlsVersion() { + return this.minTlsVersion; + } + + /** + * Set the minTlsVersion value. + * + * @param minTlsVersion the minTlsVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withMinTlsVersion(SupportedTlsVersions minTlsVersion) { + this.minTlsVersion = minTlsVersion; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteConfigurationSnapshotInfoInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteConfigurationSnapshotInfoInner.java new file mode 100644 index 00000000000..9b645b6c625 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteConfigurationSnapshotInfoInner.java @@ -0,0 +1,51 @@ +/** + * 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.web.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * A snapshot of a web app configuration. + */ +@JsonFlatten +public class SiteConfigurationSnapshotInfoInner extends ProxyOnlyResource { + /** + * The time the snapshot was taken. + */ + @JsonProperty(value = "properties.time", access = JsonProperty.Access.WRITE_ONLY) + private DateTime time; + + /** + * The id of the snapshot. + */ + @JsonProperty(value = "properties.id", access = JsonProperty.Access.WRITE_ONLY) + private Integer siteConfigurationSnapshotInfoId; + + /** + * Get the time value. + * + * @return the time value + */ + public DateTime time() { + return this.time; + } + + /** + * Get the siteConfigurationSnapshotInfoId value. + * + * @return the siteConfigurationSnapshotInfoId value + */ + public Integer siteConfigurationSnapshotInfoId() { + return this.siteConfigurationSnapshotInfoId; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteExtensionInfoInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteExtensionInfoInner.java new file mode 100644 index 00000000000..8090f534574 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteExtensionInfoInner.java @@ -0,0 +1,544 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.SiteExtensionType; +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Site Extension Information. + */ +@JsonFlatten +public class SiteExtensionInfoInner extends ProxyOnlyResource { + /** + * Site extension ID. + */ + @JsonProperty(value = "properties.id") + private String siteExtensionInfoId; + + /** + * Site extension title. + */ + @JsonProperty(value = "properties.title") + private String title; + + /** + * Site extension type. Possible values include: 'Gallery', 'WebRoot'. + */ + @JsonProperty(value = "properties.type") + private SiteExtensionType siteExtensionInfoType; + + /** + * Summary description. + */ + @JsonProperty(value = "properties.summary") + private String summary; + + /** + * Detailed description. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * Version information. + */ + @JsonProperty(value = "properties.version") + private String version; + + /** + * Extension URL. + */ + @JsonProperty(value = "properties.extensionUrl") + private String extensionUrl; + + /** + * Project URL. + */ + @JsonProperty(value = "properties.projectUrl") + private String projectUrl; + + /** + * Icon URL. + */ + @JsonProperty(value = "properties.iconUrl") + private String iconUrl; + + /** + * License URL. + */ + @JsonProperty(value = "properties.licenseUrl") + private String licenseUrl; + + /** + * Feed URL. + */ + @JsonProperty(value = "properties.feedUrl") + private String feedUrl; + + /** + * List of authors. + */ + @JsonProperty(value = "properties.authors") + private List authors; + + /** + * Installer command line parameters. + */ + @JsonProperty(value = "properties.installationArgs") + private String installationArgs; + + /** + * Published timestamp. + */ + @JsonProperty(value = "properties.publishedDateTime") + private DateTime publishedDateTime; + + /** + * Count of downloads. + */ + @JsonProperty(value = "properties.downloadCount") + private Integer downloadCount; + + /** + * <code>true</code> if the local version is the latest + * version; <code>false</code> otherwise. + */ + @JsonProperty(value = "properties.localIsLatestVersion") + private Boolean localIsLatestVersion; + + /** + * Local path. + */ + @JsonProperty(value = "properties.localPath") + private String localPath; + + /** + * Installed timestamp. + */ + @JsonProperty(value = "properties.installedDateTime") + private DateTime installedDateTime; + + /** + * Provisioning state. + */ + @JsonProperty(value = "properties.provisioningState") + private String provisioningState; + + /** + * Site Extension comment. + */ + @JsonProperty(value = "properties.comment") + private String comment; + + /** + * Get the siteExtensionInfoId value. + * + * @return the siteExtensionInfoId value + */ + public String siteExtensionInfoId() { + return this.siteExtensionInfoId; + } + + /** + * Set the siteExtensionInfoId value. + * + * @param siteExtensionInfoId the siteExtensionInfoId value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withSiteExtensionInfoId(String siteExtensionInfoId) { + this.siteExtensionInfoId = siteExtensionInfoId; + return this; + } + + /** + * Get the title value. + * + * @return the title value + */ + public String title() { + return this.title; + } + + /** + * Set the title value. + * + * @param title the title value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the siteExtensionInfoType value. + * + * @return the siteExtensionInfoType value + */ + public SiteExtensionType siteExtensionInfoType() { + return this.siteExtensionInfoType; + } + + /** + * Set the siteExtensionInfoType value. + * + * @param siteExtensionInfoType the siteExtensionInfoType value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withSiteExtensionInfoType(SiteExtensionType siteExtensionInfoType) { + this.siteExtensionInfoType = siteExtensionInfoType; + return this; + } + + /** + * Get the summary value. + * + * @return the summary value + */ + public String summary() { + return this.summary; + } + + /** + * Set the summary value. + * + * @param summary the summary value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withSummary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the version value. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set the version value. + * + * @param version the version value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the extensionUrl value. + * + * @return the extensionUrl value + */ + public String extensionUrl() { + return this.extensionUrl; + } + + /** + * Set the extensionUrl value. + * + * @param extensionUrl the extensionUrl value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withExtensionUrl(String extensionUrl) { + this.extensionUrl = extensionUrl; + return this; + } + + /** + * Get the projectUrl value. + * + * @return the projectUrl value + */ + public String projectUrl() { + return this.projectUrl; + } + + /** + * Set the projectUrl value. + * + * @param projectUrl the projectUrl value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withProjectUrl(String projectUrl) { + this.projectUrl = projectUrl; + return this; + } + + /** + * Get the iconUrl value. + * + * @return the iconUrl value + */ + public String iconUrl() { + return this.iconUrl; + } + + /** + * Set the iconUrl value. + * + * @param iconUrl the iconUrl value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withIconUrl(String iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + * Get the licenseUrl value. + * + * @return the licenseUrl value + */ + public String licenseUrl() { + return this.licenseUrl; + } + + /** + * Set the licenseUrl value. + * + * @param licenseUrl the licenseUrl value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withLicenseUrl(String licenseUrl) { + this.licenseUrl = licenseUrl; + return this; + } + + /** + * Get the feedUrl value. + * + * @return the feedUrl value + */ + public String feedUrl() { + return this.feedUrl; + } + + /** + * Set the feedUrl value. + * + * @param feedUrl the feedUrl value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withFeedUrl(String feedUrl) { + this.feedUrl = feedUrl; + return this; + } + + /** + * Get the authors value. + * + * @return the authors value + */ + public List authors() { + return this.authors; + } + + /** + * Set the authors value. + * + * @param authors the authors value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withAuthors(List authors) { + this.authors = authors; + return this; + } + + /** + * Get the installationArgs value. + * + * @return the installationArgs value + */ + public String installationArgs() { + return this.installationArgs; + } + + /** + * Set the installationArgs value. + * + * @param installationArgs the installationArgs value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withInstallationArgs(String installationArgs) { + this.installationArgs = installationArgs; + return this; + } + + /** + * Get the publishedDateTime value. + * + * @return the publishedDateTime value + */ + public DateTime publishedDateTime() { + return this.publishedDateTime; + } + + /** + * Set the publishedDateTime value. + * + * @param publishedDateTime the publishedDateTime value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withPublishedDateTime(DateTime publishedDateTime) { + this.publishedDateTime = publishedDateTime; + return this; + } + + /** + * Get the downloadCount value. + * + * @return the downloadCount value + */ + public Integer downloadCount() { + return this.downloadCount; + } + + /** + * Set the downloadCount value. + * + * @param downloadCount the downloadCount value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withDownloadCount(Integer downloadCount) { + this.downloadCount = downloadCount; + return this; + } + + /** + * Get the localIsLatestVersion value. + * + * @return the localIsLatestVersion value + */ + public Boolean localIsLatestVersion() { + return this.localIsLatestVersion; + } + + /** + * Set the localIsLatestVersion value. + * + * @param localIsLatestVersion the localIsLatestVersion value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withLocalIsLatestVersion(Boolean localIsLatestVersion) { + this.localIsLatestVersion = localIsLatestVersion; + return this; + } + + /** + * Get the localPath value. + * + * @return the localPath value + */ + public String localPath() { + return this.localPath; + } + + /** + * Set the localPath value. + * + * @param localPath the localPath value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withLocalPath(String localPath) { + this.localPath = localPath; + return this; + } + + /** + * Get the installedDateTime value. + * + * @return the installedDateTime value + */ + public DateTime installedDateTime() { + return this.installedDateTime; + } + + /** + * Set the installedDateTime value. + * + * @param installedDateTime the installedDateTime value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withInstalledDateTime(DateTime installedDateTime) { + this.installedDateTime = installedDateTime; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState value. + * + * @param provisioningState the provisioningState value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withProvisioningState(String provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the comment value. + * + * @return the comment value + */ + public String comment() { + return this.comment; + } + + /** + * Set the comment value. + * + * @param comment the comment value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withComment(String comment) { + this.comment = comment; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteInner.java new file mode 100644 index 00000000000..71cc1f3d297 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteInner.java @@ -0,0 +1,730 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.microsoft.azure.management.web.UsageState; +import com.microsoft.azure.management.web.SiteAvailabilityState; +import com.microsoft.azure.management.web.HostNameSslState; +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.SiteConfig; +import com.microsoft.azure.management.web.HostingEnvironmentProfile; +import com.microsoft.azure.management.web.CloningInfo; +import com.microsoft.azure.management.web.SlotSwapStatus; +import com.microsoft.azure.management.web.ManagedServiceIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * A web app, a mobile app backend, or an API app. + */ +@JsonFlatten +public class SiteInner extends Resource { + /** + * Current state of the app. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private String state; + + /** + * Hostnames associated with the app. + */ + @JsonProperty(value = "properties.hostNames", access = JsonProperty.Access.WRITE_ONLY) + private List hostNames; + + /** + * Name of the repository site. + */ + @JsonProperty(value = "properties.repositorySiteName", access = JsonProperty.Access.WRITE_ONLY) + private String repositorySiteName; + + /** + * State indicating whether the app has exceeded its quota usage. + * Read-only. Possible values include: 'Normal', 'Exceeded'. + */ + @JsonProperty(value = "properties.usageState", access = JsonProperty.Access.WRITE_ONLY) + private UsageState usageState; + + /** + * <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the + * app (takes the app offline). + */ + @JsonProperty(value = "properties.enabled") + private Boolean enabled; + + /** + * Enabled hostnames for the app.Hostnames need to be assigned (see + * HostNames) AND enabled. Otherwise, + * the app is not served on those hostnames. + */ + @JsonProperty(value = "properties.enabledHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List enabledHostNames; + + /** + * Management information availability state for the app. Possible values + * include: 'Normal', 'Limited', 'DisasterRecoveryMode'. + */ + @JsonProperty(value = "properties.availabilityState", access = JsonProperty.Access.WRITE_ONLY) + private SiteAvailabilityState availabilityState; + + /** + * Hostname SSL states are used to manage the SSL bindings for app's + * hostnames. + */ + @JsonProperty(value = "properties.hostNameSslStates") + private List hostNameSslStates; + + /** + * Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + */ + @JsonProperty(value = "properties.serverFarmId") + private String serverFarmId; + + /** + * <code>true</code> if reserved; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.reserved") + private Boolean reserved; + + /** + * Last time the app was modified, in UTC. Read-only. + */ + @JsonProperty(value = "properties.lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTimeUtc; + + /** + * Configuration of the app. + */ + @JsonProperty(value = "properties.siteConfig") + private SiteConfig siteConfig; + + /** + * Azure Traffic Manager hostnames associated with the app. Read-only. + */ + @JsonProperty(value = "properties.trafficManagerHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List trafficManagerHostNames; + + /** + * <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is + * <code>false</code>. + */ + @JsonProperty(value = "properties.scmSiteAlsoStopped") + private Boolean scmSiteAlsoStopped; + + /** + * Specifies which deployment slot this app will swap into. Read-only. + */ + @JsonProperty(value = "properties.targetSwapSlot", access = JsonProperty.Access.WRITE_ONLY) + private String targetSwapSlot; + + /** + * App Service Environment to use for the app. + */ + @JsonProperty(value = "properties.hostingEnvironmentProfile") + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /** + * <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, + * which route client requests in the same session to the same instance. + * Default is <code>true</code>. + */ + @JsonProperty(value = "properties.clientAffinityEnabled") + private Boolean clientAffinityEnabled; + + /** + * <code>true</code> to enable client certificate + * authentication (TLS mutual authentication); otherwise, + * <code>false</code>. Default is + * <code>false</code>. + */ + @JsonProperty(value = "properties.clientCertEnabled") + private Boolean clientCertEnabled; + + /** + * <code>true</code> to disable the public hostnames of the + * app; otherwise, <code>false</code>. + * If <code>true</code>, the app is only accessible via API + * management process. + */ + @JsonProperty(value = "properties.hostNamesDisabled") + private Boolean hostNamesDisabled; + + /** + * List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted + * with current settings. Read-only. + */ + @JsonProperty(value = "properties.outboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private String outboundIpAddresses; + + /** + * List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from all tenants. Read-only. + */ + @JsonProperty(value = "properties.possibleOutboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private String possibleOutboundIpAddresses; + + /** + * Size of the function container. + */ + @JsonProperty(value = "properties.containerSize") + private Integer containerSize; + + /** + * Maximum allowed daily memory-time quota (applicable on dynamic apps + * only). + */ + @JsonProperty(value = "properties.dailyMemoryTimeQuota") + private Integer dailyMemoryTimeQuota; + + /** + * App suspended till in case memory-time quota is exceeded. + */ + @JsonProperty(value = "properties.suspendedTill", access = JsonProperty.Access.WRITE_ONLY) + private DateTime suspendedTill; + + /** + * Maximum number of workers. + * This only applies to Functions container. + */ + @JsonProperty(value = "properties.maxNumberOfWorkers", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxNumberOfWorkers; + + /** + * If specified during app creation, the app is cloned from a source app. + */ + @JsonProperty(value = "properties.cloningInfo") + private CloningInfo cloningInfo; + + /** + * If specified during app creation, the app is created from a previous + * snapshot. + */ + @JsonProperty(value = "properties.snapshotInfo") + private SnapshotRecoveryRequestInner snapshotInfo; + + /** + * Name of the resource group the app belongs to. Read-only. + */ + @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /** + * <code>true</code> if the app is a default container; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.isDefaultContainer", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefaultContainer; + + /** + * Default hostname of the app. Read-only. + */ + @JsonProperty(value = "properties.defaultHostName", access = JsonProperty.Access.WRITE_ONLY) + private String defaultHostName; + + /** + * Status of the last deployment slot swap operation. + */ + @JsonProperty(value = "properties.slotSwapStatus", access = JsonProperty.Access.WRITE_ONLY) + private SlotSwapStatus slotSwapStatus; + + /** + * HttpsOnly: configures a web site to accept only https requests. Issues + * redirect for + * http requests. + */ + @JsonProperty(value = "properties.httpsOnly") + private Boolean httpsOnly; + + /** + * The identity property. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /** + * Get the state value. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Get the hostNames value. + * + * @return the hostNames value + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Get the repositorySiteName value. + * + * @return the repositorySiteName value + */ + public String repositorySiteName() { + return this.repositorySiteName; + } + + /** + * Get the usageState value. + * + * @return the usageState value + */ + public UsageState usageState() { + return this.usageState; + } + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the SiteInner object itself. + */ + public SiteInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the enabledHostNames value. + * + * @return the enabledHostNames value + */ + public List enabledHostNames() { + return this.enabledHostNames; + } + + /** + * Get the availabilityState value. + * + * @return the availabilityState value + */ + public SiteAvailabilityState availabilityState() { + return this.availabilityState; + } + + /** + * Get the hostNameSslStates value. + * + * @return the hostNameSslStates value + */ + public List hostNameSslStates() { + return this.hostNameSslStates; + } + + /** + * Set the hostNameSslStates value. + * + * @param hostNameSslStates the hostNameSslStates value to set + * @return the SiteInner object itself. + */ + public SiteInner withHostNameSslStates(List hostNameSslStates) { + this.hostNameSslStates = hostNameSslStates; + return this; + } + + /** + * 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 SiteInner object itself. + */ + public SiteInner withServerFarmId(String serverFarmId) { + this.serverFarmId = 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. + * + * @return the lastModifiedTimeUtc value + */ + public DateTime lastModifiedTimeUtc() { + return this.lastModifiedTimeUtc; + } + + /** + * Get the siteConfig value. + * + * @return the siteConfig value + */ + public SiteConfig siteConfig() { + return this.siteConfig; + } + + /** + * Set the siteConfig value. + * + * @param siteConfig the siteConfig value to set + * @return the SiteInner object itself. + */ + public SiteInner withSiteConfig(SiteConfig siteConfig) { + this.siteConfig = siteConfig; + return this; + } + + /** + * Get the trafficManagerHostNames value. + * + * @return the trafficManagerHostNames value + */ + public List trafficManagerHostNames() { + return this.trafficManagerHostNames; + } + + /** + * Get the scmSiteAlsoStopped value. + * + * @return the scmSiteAlsoStopped value + */ + public Boolean scmSiteAlsoStopped() { + return this.scmSiteAlsoStopped; + } + + /** + * Set the scmSiteAlsoStopped value. + * + * @param scmSiteAlsoStopped the scmSiteAlsoStopped value to set + * @return the SiteInner object itself. + */ + public SiteInner withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped) { + this.scmSiteAlsoStopped = scmSiteAlsoStopped; + return this; + } + + /** + * Get the targetSwapSlot value. + * + * @return the targetSwapSlot value + */ + public String targetSwapSlot() { + return this.targetSwapSlot; + } + + /** + * Get the hostingEnvironmentProfile value. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set the hostingEnvironmentProfile value. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set + * @return the SiteInner object itself. + */ + public SiteInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get the clientAffinityEnabled value. + * + * @return the clientAffinityEnabled value + */ + public Boolean clientAffinityEnabled() { + return this.clientAffinityEnabled; + } + + /** + * Set the clientAffinityEnabled value. + * + * @param clientAffinityEnabled the clientAffinityEnabled value to set + * @return the SiteInner object itself. + */ + public SiteInner withClientAffinityEnabled(Boolean clientAffinityEnabled) { + this.clientAffinityEnabled = clientAffinityEnabled; + return this; + } + + /** + * Get the clientCertEnabled value. + * + * @return the clientCertEnabled value + */ + public Boolean clientCertEnabled() { + return this.clientCertEnabled; + } + + /** + * Set the clientCertEnabled value. + * + * @param clientCertEnabled the clientCertEnabled value to set + * @return the SiteInner object itself. + */ + public SiteInner withClientCertEnabled(Boolean clientCertEnabled) { + this.clientCertEnabled = clientCertEnabled; + return this; + } + + /** + * Get the hostNamesDisabled value. + * + * @return the hostNamesDisabled value + */ + public Boolean hostNamesDisabled() { + return this.hostNamesDisabled; + } + + /** + * Set the hostNamesDisabled value. + * + * @param hostNamesDisabled the hostNamesDisabled value to set + * @return the SiteInner object itself. + */ + public SiteInner withHostNamesDisabled(Boolean hostNamesDisabled) { + this.hostNamesDisabled = hostNamesDisabled; + return this; + } + + /** + * Get the outboundIpAddresses value. + * + * @return the outboundIpAddresses value + */ + public String outboundIpAddresses() { + return this.outboundIpAddresses; + } + + /** + * Get the possibleOutboundIpAddresses value. + * + * @return the possibleOutboundIpAddresses value + */ + public String possibleOutboundIpAddresses() { + return this.possibleOutboundIpAddresses; + } + + /** + * Get the containerSize value. + * + * @return the containerSize value + */ + public Integer containerSize() { + return this.containerSize; + } + + /** + * Set the containerSize value. + * + * @param containerSize the containerSize value to set + * @return the SiteInner object itself. + */ + public SiteInner withContainerSize(Integer containerSize) { + this.containerSize = 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; + } + + /** + * Get the maxNumberOfWorkers value. + * + * @return the maxNumberOfWorkers value + */ + public Integer maxNumberOfWorkers() { + return this.maxNumberOfWorkers; + } + + /** + * Get the cloningInfo value. + * + * @return the cloningInfo value + */ + public CloningInfo cloningInfo() { + return this.cloningInfo; + } + + /** + * Set the cloningInfo value. + * + * @param cloningInfo the cloningInfo value to set + * @return the SiteInner object itself. + */ + public SiteInner withCloningInfo(CloningInfo cloningInfo) { + this.cloningInfo = cloningInfo; + return this; + } + + /** + * Get the snapshotInfo value. + * + * @return the snapshotInfo value + */ + public SnapshotRecoveryRequestInner snapshotInfo() { + return this.snapshotInfo; + } + + /** + * Set the snapshotInfo value. + * + * @param snapshotInfo the snapshotInfo value to set + * @return the SiteInner object itself. + */ + public SiteInner withSnapshotInfo(SnapshotRecoveryRequestInner snapshotInfo) { + this.snapshotInfo = snapshotInfo; + return this; + } + + /** + * Get the resourceGroup value. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get the isDefaultContainer value. + * + * @return the isDefaultContainer value + */ + public Boolean isDefaultContainer() { + return this.isDefaultContainer; + } + + /** + * Get the defaultHostName value. + * + * @return the defaultHostName value + */ + public String defaultHostName() { + return this.defaultHostName; + } + + /** + * Get the slotSwapStatus value. + * + * @return the slotSwapStatus value + */ + public SlotSwapStatus slotSwapStatus() { + return this.slotSwapStatus; + } + + /** + * Get the httpsOnly value. + * + * @return the httpsOnly value + */ + public Boolean httpsOnly() { + return this.httpsOnly; + } + + /** + * Set the httpsOnly value. + * + * @param httpsOnly the httpsOnly value to set + * @return the SiteInner object itself. + */ + public SiteInner withHttpsOnly(Boolean httpsOnly) { + this.httpsOnly = httpsOnly; + return this; + } + + /** + * Get the identity value. + * + * @return the identity value + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity value. + * + * @param identity the identity value to set + * @return the SiteInner object itself. + */ + public SiteInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteInstanceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteInstanceInner.java new file mode 100644 index 00000000000..9ceae8a759e --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteInstanceInner.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Instance of an app. + */ +@JsonFlatten +public class SiteInstanceInner extends ProxyOnlyResource { + /** + * Name of instance. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private String siteInstanceName; + + /** + * Get the siteInstanceName value. + * + * @return the siteInstanceName value + */ + public String siteInstanceName() { + return this.siteInstanceName; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteLogsConfigInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteLogsConfigInner.java new file mode 100644 index 00000000000..7bd9d7c63d5 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteLogsConfigInner.java @@ -0,0 +1,127 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.ApplicationLogsConfig; +import com.microsoft.azure.management.web.HttpLogsConfig; +import com.microsoft.azure.management.web.EnabledConfig; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Configuration of App Service site logs. + */ +@JsonFlatten +public class SiteLogsConfigInner extends ProxyOnlyResource { + /** + * Application logs configuration. + */ + @JsonProperty(value = "properties.applicationLogs") + private ApplicationLogsConfig applicationLogs; + + /** + * HTTP logs configuration. + */ + @JsonProperty(value = "properties.httpLogs") + private HttpLogsConfig httpLogs; + + /** + * Failed requests tracing configuration. + */ + @JsonProperty(value = "properties.failedRequestsTracing") + private EnabledConfig failedRequestsTracing; + + /** + * Detailed error messages configuration. + */ + @JsonProperty(value = "properties.detailedErrorMessages") + private EnabledConfig detailedErrorMessages; + + /** + * Get the applicationLogs value. + * + * @return the applicationLogs value + */ + public ApplicationLogsConfig applicationLogs() { + return this.applicationLogs; + } + + /** + * Set the applicationLogs value. + * + * @param applicationLogs the applicationLogs value to set + * @return the SiteLogsConfigInner object itself. + */ + public SiteLogsConfigInner withApplicationLogs(ApplicationLogsConfig applicationLogs) { + this.applicationLogs = applicationLogs; + return this; + } + + /** + * Get the httpLogs value. + * + * @return the httpLogs value + */ + public HttpLogsConfig httpLogs() { + return this.httpLogs; + } + + /** + * Set the httpLogs value. + * + * @param httpLogs the httpLogs value to set + * @return the SiteLogsConfigInner object itself. + */ + public SiteLogsConfigInner withHttpLogs(HttpLogsConfig httpLogs) { + this.httpLogs = httpLogs; + return this; + } + + /** + * Get the failedRequestsTracing value. + * + * @return the failedRequestsTracing value + */ + public EnabledConfig failedRequestsTracing() { + return this.failedRequestsTracing; + } + + /** + * Set the failedRequestsTracing value. + * + * @param failedRequestsTracing the failedRequestsTracing value to set + * @return the SiteLogsConfigInner object itself. + */ + public SiteLogsConfigInner withFailedRequestsTracing(EnabledConfig failedRequestsTracing) { + this.failedRequestsTracing = failedRequestsTracing; + return this; + } + + /** + * Get the detailedErrorMessages value. + * + * @return the detailedErrorMessages value + */ + public EnabledConfig detailedErrorMessages() { + return this.detailedErrorMessages; + } + + /** + * Set the detailedErrorMessages value. + * + * @param detailedErrorMessages the detailedErrorMessages value to set + * @return the SiteLogsConfigInner object itself. + */ + public SiteLogsConfigInner withDetailedErrorMessages(EnabledConfig detailedErrorMessages) { + this.detailedErrorMessages = detailedErrorMessages; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SitePatchResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SitePatchResourceInner.java new file mode 100644 index 00000000000..a607a0acb97 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SitePatchResourceInner.java @@ -0,0 +1,703 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.microsoft.azure.management.web.UsageState; +import com.microsoft.azure.management.web.SiteAvailabilityState; +import com.microsoft.azure.management.web.HostNameSslState; +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.SiteConfig; +import com.microsoft.azure.management.web.HostingEnvironmentProfile; +import com.microsoft.azure.management.web.CloningInfo; +import com.microsoft.azure.management.web.SlotSwapStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * ARM resource for a site. + */ +@JsonFlatten +public class SitePatchResourceInner extends ProxyOnlyResource { + /** + * Current state of the app. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private String state; + + /** + * Hostnames associated with the app. + */ + @JsonProperty(value = "properties.hostNames", access = JsonProperty.Access.WRITE_ONLY) + private List hostNames; + + /** + * Name of the repository site. + */ + @JsonProperty(value = "properties.repositorySiteName", access = JsonProperty.Access.WRITE_ONLY) + private String repositorySiteName; + + /** + * State indicating whether the app has exceeded its quota usage. + * Read-only. Possible values include: 'Normal', 'Exceeded'. + */ + @JsonProperty(value = "properties.usageState", access = JsonProperty.Access.WRITE_ONLY) + private UsageState usageState; + + /** + * <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the + * app (takes the app offline). + */ + @JsonProperty(value = "properties.enabled") + private Boolean enabled; + + /** + * Enabled hostnames for the app.Hostnames need to be assigned (see + * HostNames) AND enabled. Otherwise, + * the app is not served on those hostnames. + */ + @JsonProperty(value = "properties.enabledHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List enabledHostNames; + + /** + * Management information availability state for the app. Possible values + * include: 'Normal', 'Limited', 'DisasterRecoveryMode'. + */ + @JsonProperty(value = "properties.availabilityState", access = JsonProperty.Access.WRITE_ONLY) + private SiteAvailabilityState availabilityState; + + /** + * Hostname SSL states are used to manage the SSL bindings for app's + * hostnames. + */ + @JsonProperty(value = "properties.hostNameSslStates") + private List hostNameSslStates; + + /** + * Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + */ + @JsonProperty(value = "properties.serverFarmId") + private String serverFarmId; + + /** + * <code>true</code> if reserved; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.reserved") + private Boolean reserved; + + /** + * Last time the app was modified, in UTC. Read-only. + */ + @JsonProperty(value = "properties.lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTimeUtc; + + /** + * Configuration of the app. + */ + @JsonProperty(value = "properties.siteConfig") + private SiteConfig siteConfig; + + /** + * Azure Traffic Manager hostnames associated with the app. Read-only. + */ + @JsonProperty(value = "properties.trafficManagerHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List trafficManagerHostNames; + + /** + * <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is + * <code>false</code>. + */ + @JsonProperty(value = "properties.scmSiteAlsoStopped") + private Boolean scmSiteAlsoStopped; + + /** + * Specifies which deployment slot this app will swap into. Read-only. + */ + @JsonProperty(value = "properties.targetSwapSlot", access = JsonProperty.Access.WRITE_ONLY) + private String targetSwapSlot; + + /** + * App Service Environment to use for the app. + */ + @JsonProperty(value = "properties.hostingEnvironmentProfile") + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /** + * <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, + * which route client requests in the same session to the same instance. + * Default is <code>true</code>. + */ + @JsonProperty(value = "properties.clientAffinityEnabled") + private Boolean clientAffinityEnabled; + + /** + * <code>true</code> to enable client certificate + * authentication (TLS mutual authentication); otherwise, + * <code>false</code>. Default is + * <code>false</code>. + */ + @JsonProperty(value = "properties.clientCertEnabled") + private Boolean clientCertEnabled; + + /** + * <code>true</code> to disable the public hostnames of the + * app; otherwise, <code>false</code>. + * If <code>true</code>, the app is only accessible via API + * management process. + */ + @JsonProperty(value = "properties.hostNamesDisabled") + private Boolean hostNamesDisabled; + + /** + * List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted + * with current settings. Read-only. + */ + @JsonProperty(value = "properties.outboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private String outboundIpAddresses; + + /** + * List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from all tenants. Read-only. + */ + @JsonProperty(value = "properties.possibleOutboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private String possibleOutboundIpAddresses; + + /** + * Size of the function container. + */ + @JsonProperty(value = "properties.containerSize") + private Integer containerSize; + + /** + * Maximum allowed daily memory-time quota (applicable on dynamic apps + * only). + */ + @JsonProperty(value = "properties.dailyMemoryTimeQuota") + private Integer dailyMemoryTimeQuota; + + /** + * App suspended till in case memory-time quota is exceeded. + */ + @JsonProperty(value = "properties.suspendedTill", access = JsonProperty.Access.WRITE_ONLY) + private DateTime suspendedTill; + + /** + * Maximum number of workers. + * This only applies to Functions container. + */ + @JsonProperty(value = "properties.maxNumberOfWorkers", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxNumberOfWorkers; + + /** + * If specified during app creation, the app is cloned from a source app. + */ + @JsonProperty(value = "properties.cloningInfo") + private CloningInfo cloningInfo; + + /** + * If specified during app creation, the app is created from a previous + * snapshot. + */ + @JsonProperty(value = "properties.snapshotInfo") + private SnapshotRecoveryRequestInner snapshotInfo; + + /** + * Name of the resource group the app belongs to. Read-only. + */ + @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /** + * <code>true</code> if the app is a default container; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.isDefaultContainer", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefaultContainer; + + /** + * Default hostname of the app. Read-only. + */ + @JsonProperty(value = "properties.defaultHostName", access = JsonProperty.Access.WRITE_ONLY) + private String defaultHostName; + + /** + * Status of the last deployment slot swap operation. + */ + @JsonProperty(value = "properties.slotSwapStatus", access = JsonProperty.Access.WRITE_ONLY) + private SlotSwapStatus slotSwapStatus; + + /** + * HttpsOnly: configures a web site to accept only https requests. Issues + * redirect for + * http requests. + */ + @JsonProperty(value = "properties.httpsOnly") + private Boolean httpsOnly; + + /** + * Get the state value. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Get the hostNames value. + * + * @return the hostNames value + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Get the repositorySiteName value. + * + * @return the repositorySiteName value + */ + public String repositorySiteName() { + return this.repositorySiteName; + } + + /** + * Get the usageState value. + * + * @return the usageState value + */ + public UsageState usageState() { + return this.usageState; + } + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the enabledHostNames value. + * + * @return the enabledHostNames value + */ + public List enabledHostNames() { + return this.enabledHostNames; + } + + /** + * Get the availabilityState value. + * + * @return the availabilityState value + */ + public SiteAvailabilityState availabilityState() { + return this.availabilityState; + } + + /** + * Get the hostNameSslStates value. + * + * @return the hostNameSslStates value + */ + public List hostNameSslStates() { + return this.hostNameSslStates; + } + + /** + * Set the hostNameSslStates value. + * + * @param hostNameSslStates the hostNameSslStates value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withHostNameSslStates(List hostNameSslStates) { + this.hostNameSslStates = hostNameSslStates; + return this; + } + + /** + * 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 SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withServerFarmId(String serverFarmId) { + this.serverFarmId = 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 SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + + /** + * Get the lastModifiedTimeUtc value. + * + * @return the lastModifiedTimeUtc value + */ + public DateTime lastModifiedTimeUtc() { + return this.lastModifiedTimeUtc; + } + + /** + * Get the siteConfig value. + * + * @return the siteConfig value + */ + public SiteConfig siteConfig() { + return this.siteConfig; + } + + /** + * Set the siteConfig value. + * + * @param siteConfig the siteConfig value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withSiteConfig(SiteConfig siteConfig) { + this.siteConfig = siteConfig; + return this; + } + + /** + * Get the trafficManagerHostNames value. + * + * @return the trafficManagerHostNames value + */ + public List trafficManagerHostNames() { + return this.trafficManagerHostNames; + } + + /** + * Get the scmSiteAlsoStopped value. + * + * @return the scmSiteAlsoStopped value + */ + public Boolean scmSiteAlsoStopped() { + return this.scmSiteAlsoStopped; + } + + /** + * Set the scmSiteAlsoStopped value. + * + * @param scmSiteAlsoStopped the scmSiteAlsoStopped value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped) { + this.scmSiteAlsoStopped = scmSiteAlsoStopped; + return this; + } + + /** + * Get the targetSwapSlot value. + * + * @return the targetSwapSlot value + */ + public String targetSwapSlot() { + return this.targetSwapSlot; + } + + /** + * Get the hostingEnvironmentProfile value. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set the hostingEnvironmentProfile value. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get the clientAffinityEnabled value. + * + * @return the clientAffinityEnabled value + */ + public Boolean clientAffinityEnabled() { + return this.clientAffinityEnabled; + } + + /** + * Set the clientAffinityEnabled value. + * + * @param clientAffinityEnabled the clientAffinityEnabled value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withClientAffinityEnabled(Boolean clientAffinityEnabled) { + this.clientAffinityEnabled = clientAffinityEnabled; + return this; + } + + /** + * Get the clientCertEnabled value. + * + * @return the clientCertEnabled value + */ + public Boolean clientCertEnabled() { + return this.clientCertEnabled; + } + + /** + * Set the clientCertEnabled value. + * + * @param clientCertEnabled the clientCertEnabled value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withClientCertEnabled(Boolean clientCertEnabled) { + this.clientCertEnabled = clientCertEnabled; + return this; + } + + /** + * Get the hostNamesDisabled value. + * + * @return the hostNamesDisabled value + */ + public Boolean hostNamesDisabled() { + return this.hostNamesDisabled; + } + + /** + * Set the hostNamesDisabled value. + * + * @param hostNamesDisabled the hostNamesDisabled value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withHostNamesDisabled(Boolean hostNamesDisabled) { + this.hostNamesDisabled = hostNamesDisabled; + return this; + } + + /** + * Get the outboundIpAddresses value. + * + * @return the outboundIpAddresses value + */ + public String outboundIpAddresses() { + return this.outboundIpAddresses; + } + + /** + * Get the possibleOutboundIpAddresses value. + * + * @return the possibleOutboundIpAddresses value + */ + public String possibleOutboundIpAddresses() { + return this.possibleOutboundIpAddresses; + } + + /** + * Get the containerSize value. + * + * @return the containerSize value + */ + public Integer containerSize() { + return this.containerSize; + } + + /** + * Set the containerSize value. + * + * @param containerSize the containerSize value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withContainerSize(Integer containerSize) { + this.containerSize = 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 SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + this.dailyMemoryTimeQuota = dailyMemoryTimeQuota; + return this; + } + + /** + * Get the suspendedTill value. + * + * @return the suspendedTill value + */ + public DateTime suspendedTill() { + return this.suspendedTill; + } + + /** + * Get the maxNumberOfWorkers value. + * + * @return the maxNumberOfWorkers value + */ + public Integer maxNumberOfWorkers() { + return this.maxNumberOfWorkers; + } + + /** + * Get the cloningInfo value. + * + * @return the cloningInfo value + */ + public CloningInfo cloningInfo() { + return this.cloningInfo; + } + + /** + * Set the cloningInfo value. + * + * @param cloningInfo the cloningInfo value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withCloningInfo(CloningInfo cloningInfo) { + this.cloningInfo = cloningInfo; + return this; + } + + /** + * Get the snapshotInfo value. + * + * @return the snapshotInfo value + */ + public SnapshotRecoveryRequestInner snapshotInfo() { + return this.snapshotInfo; + } + + /** + * Set the snapshotInfo value. + * + * @param snapshotInfo the snapshotInfo value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withSnapshotInfo(SnapshotRecoveryRequestInner snapshotInfo) { + this.snapshotInfo = snapshotInfo; + return this; + } + + /** + * Get the resourceGroup value. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get the isDefaultContainer value. + * + * @return the isDefaultContainer value + */ + public Boolean isDefaultContainer() { + return this.isDefaultContainer; + } + + /** + * Get the defaultHostName value. + * + * @return the defaultHostName value + */ + public String defaultHostName() { + return this.defaultHostName; + } + + /** + * Get the slotSwapStatus value. + * + * @return the slotSwapStatus value + */ + public SlotSwapStatus slotSwapStatus() { + return this.slotSwapStatus; + } + + /** + * Get the httpsOnly value. + * + * @return the httpsOnly value + */ + public Boolean httpsOnly() { + return this.httpsOnly; + } + + /** + * Set the httpsOnly value. + * + * @param httpsOnly the httpsOnly value to set + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withHttpsOnly(Boolean httpsOnly) { + this.httpsOnly = httpsOnly; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SitePhpErrorLogFlagInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SitePhpErrorLogFlagInner.java new file mode 100644 index 00000000000..149a6345c25 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SitePhpErrorLogFlagInner.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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Used for getting PHP error logging flag. + */ +@JsonFlatten +public class SitePhpErrorLogFlagInner extends ProxyOnlyResource { + /** + * Local log_errors setting. + */ + @JsonProperty(value = "properties.localLogErrors") + private String localLogErrors; + + /** + * Master log_errors setting. + */ + @JsonProperty(value = "properties.masterLogErrors") + private String masterLogErrors; + + /** + * Local log_errors_max_len setting. + */ + @JsonProperty(value = "properties.localLogErrorsMaxLength") + private String localLogErrorsMaxLength; + + /** + * Master log_errors_max_len setting. + */ + @JsonProperty(value = "properties.masterLogErrorsMaxLength") + private String masterLogErrorsMaxLength; + + /** + * Get the localLogErrors value. + * + * @return the localLogErrors value + */ + public String localLogErrors() { + return this.localLogErrors; + } + + /** + * Set the localLogErrors value. + * + * @param localLogErrors the localLogErrors value to set + * @return the SitePhpErrorLogFlagInner object itself. + */ + public SitePhpErrorLogFlagInner withLocalLogErrors(String localLogErrors) { + this.localLogErrors = localLogErrors; + return this; + } + + /** + * Get the masterLogErrors value. + * + * @return the masterLogErrors value + */ + public String masterLogErrors() { + return this.masterLogErrors; + } + + /** + * Set the masterLogErrors value. + * + * @param masterLogErrors the masterLogErrors value to set + * @return the SitePhpErrorLogFlagInner object itself. + */ + public SitePhpErrorLogFlagInner withMasterLogErrors(String masterLogErrors) { + this.masterLogErrors = masterLogErrors; + return this; + } + + /** + * Get the localLogErrorsMaxLength value. + * + * @return the localLogErrorsMaxLength value + */ + public String localLogErrorsMaxLength() { + return this.localLogErrorsMaxLength; + } + + /** + * Set the localLogErrorsMaxLength value. + * + * @param localLogErrorsMaxLength the localLogErrorsMaxLength value to set + * @return the SitePhpErrorLogFlagInner object itself. + */ + public SitePhpErrorLogFlagInner withLocalLogErrorsMaxLength(String localLogErrorsMaxLength) { + this.localLogErrorsMaxLength = localLogErrorsMaxLength; + return this; + } + + /** + * Get the masterLogErrorsMaxLength value. + * + * @return the masterLogErrorsMaxLength value + */ + public String masterLogErrorsMaxLength() { + return this.masterLogErrorsMaxLength; + } + + /** + * Set the masterLogErrorsMaxLength value. + * + * @param masterLogErrorsMaxLength the masterLogErrorsMaxLength value to set + * @return the SitePhpErrorLogFlagInner object itself. + */ + public SitePhpErrorLogFlagInner withMasterLogErrorsMaxLength(String masterLogErrorsMaxLength) { + this.masterLogErrorsMaxLength = masterLogErrorsMaxLength; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteSealInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteSealInner.java new file mode 100644 index 00000000000..71d41131e71 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteSealInner.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Site seal. + */ +public class SiteSealInner { + /** + * HTML snippet. + */ + @JsonProperty(value = "html", required = true) + private String html; + + /** + * Get the html value. + * + * @return the html value + */ + public String html() { + return this.html; + } + + /** + * Set the html value. + * + * @param html the html value to set + * @return the SiteSealInner object itself. + */ + public SiteSealInner withHtml(String html) { + this.html = html; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteSealRequestInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteSealRequestInner.java new file mode 100644 index 00000000000..50d4658f531 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteSealRequestInner.java @@ -0,0 +1,70 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Site seal request. + */ +public class SiteSealRequestInner { + /** + * If <code>true</code> use the light color theme for site + * seal; otherwise, use the default color theme. + */ + @JsonProperty(value = "lightTheme") + private Boolean lightTheme; + + /** + * Locale of site seal. + */ + @JsonProperty(value = "locale") + private String locale; + + /** + * Get the lightTheme value. + * + * @return the lightTheme value + */ + public Boolean lightTheme() { + return this.lightTheme; + } + + /** + * Set the lightTheme value. + * + * @param lightTheme the lightTheme value to set + * @return the SiteSealRequestInner object itself. + */ + public SiteSealRequestInner withLightTheme(Boolean lightTheme) { + this.lightTheme = lightTheme; + return this; + } + + /** + * Get the locale value. + * + * @return the locale value + */ + public String locale() { + return this.locale; + } + + /** + * Set the locale value. + * + * @param locale the locale value to set + * @return the SiteSealRequestInner object itself. + */ + public SiteSealRequestInner withLocale(String locale) { + this.locale = locale; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteSourceControlInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteSourceControlInner.java new file mode 100644 index 00000000000..506e9271f8d --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SiteSourceControlInner.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Source control configuration for an app. + */ +@JsonFlatten +public class SiteSourceControlInner extends ProxyOnlyResource { + /** + * Repository or source control URL. + */ + @JsonProperty(value = "properties.repoUrl") + private String repoUrl; + + /** + * Name of branch to use for deployment. + */ + @JsonProperty(value = "properties.branch") + private String branch; + + /** + * <code>true</code> to limit to manual integration; + * <code>false</code> to enable continuous integration (which + * configures webhooks into online repos like GitHub). + */ + @JsonProperty(value = "properties.isManualIntegration") + private Boolean isManualIntegration; + + /** + * <code>true</code> to enable deployment rollback; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.deploymentRollbackEnabled") + private Boolean deploymentRollbackEnabled; + + /** + * <code>true</code> for a Mercurial repository; + * <code>false</code> for a Git repository. + */ + @JsonProperty(value = "properties.isMercurial") + private Boolean isMercurial; + + /** + * Get the repoUrl value. + * + * @return the repoUrl value + */ + public String repoUrl() { + return this.repoUrl; + } + + /** + * Set the repoUrl value. + * + * @param repoUrl the repoUrl value to set + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withRepoUrl(String repoUrl) { + this.repoUrl = repoUrl; + return this; + } + + /** + * Get the branch value. + * + * @return the branch value + */ + public String branch() { + return this.branch; + } + + /** + * Set the branch value. + * + * @param branch the branch value to set + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withBranch(String branch) { + this.branch = branch; + return this; + } + + /** + * Get the isManualIntegration value. + * + * @return the isManualIntegration value + */ + public Boolean isManualIntegration() { + return this.isManualIntegration; + } + + /** + * Set the isManualIntegration value. + * + * @param isManualIntegration the isManualIntegration value to set + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withIsManualIntegration(Boolean isManualIntegration) { + this.isManualIntegration = isManualIntegration; + return this; + } + + /** + * Get the deploymentRollbackEnabled value. + * + * @return the deploymentRollbackEnabled value + */ + public Boolean deploymentRollbackEnabled() { + return this.deploymentRollbackEnabled; + } + + /** + * Set the deploymentRollbackEnabled value. + * + * @param deploymentRollbackEnabled the deploymentRollbackEnabled value to set + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withDeploymentRollbackEnabled(Boolean deploymentRollbackEnabled) { + this.deploymentRollbackEnabled = deploymentRollbackEnabled; + return this; + } + + /** + * Get the isMercurial value. + * + * @return the isMercurial value + */ + public Boolean isMercurial() { + return this.isMercurial; + } + + /** + * Set the isMercurial value. + * + * @param isMercurial the isMercurial value to set + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withIsMercurial(Boolean isMercurial) { + this.isMercurial = isMercurial; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SkuInfoInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SkuInfoInner.java new file mode 100644 index 00000000000..7617cc1c702 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SkuInfoInner.java @@ -0,0 +1,97 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.SkuDescription; +import com.microsoft.azure.management.web.SkuCapacity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SKU discovery information. + */ +public class SkuInfoInner { + /** + * Resource type that this SKU applies to. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /** + * Name and tier of the SKU. + */ + @JsonProperty(value = "sku") + private SkuDescription sku; + + /** + * Min, max, and default scale values of the SKU. + */ + @JsonProperty(value = "capacity") + private SkuCapacity capacity; + + /** + * Get the resourceType value. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType value. + * + * @param resourceType the resourceType value to set + * @return the SkuInfoInner object itself. + */ + public SkuInfoInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public SkuDescription sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the SkuInfoInner object itself. + */ + public SkuInfoInner withSku(SkuDescription sku) { + this.sku = sku; + return this; + } + + /** + * Get the capacity value. + * + * @return the capacity value + */ + public SkuCapacity capacity() { + return this.capacity; + } + + /** + * Set the capacity value. + * + * @param capacity the capacity value to set + * @return the SkuInfoInner object itself. + */ + public SkuInfoInner withCapacity(SkuCapacity capacity) { + this.capacity = capacity; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SkuInfosInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SkuInfosInner.java new file mode 100644 index 00000000000..6a4c46fbe13 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SkuInfosInner.java @@ -0,0 +1,71 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.microsoft.azure.management.web.GlobalCsmSkuDescription; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Collection of SKU information. + */ +public class SkuInfosInner { + /** + * Resource type that this SKU applies to. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /** + * List of SKUs the subscription is able to use. + */ + @JsonProperty(value = "skus") + private List skus; + + /** + * Get the resourceType value. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType value. + * + * @param resourceType the resourceType value to set + * @return the SkuInfosInner object itself. + */ + public SkuInfosInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the skus value. + * + * @return the skus value + */ + public List skus() { + return this.skus; + } + + /** + * Set the skus value. + * + * @param skus the skus value to set + * @return the SkuInfosInner object itself. + */ + public SkuInfosInner withSkus(List skus) { + this.skus = skus; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SlotConfigNamesResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SlotConfigNamesResourceInner.java new file mode 100644 index 00000000000..c52ad0c5348 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SlotConfigNamesResourceInner.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.web.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Slot Config names azure resource. + */ +@JsonFlatten +public class SlotConfigNamesResourceInner extends ProxyOnlyResource { + /** + * List of connection string names. + */ + @JsonProperty(value = "properties.connectionStringNames") + private List connectionStringNames; + + /** + * List of application settings names. + */ + @JsonProperty(value = "properties.appSettingNames") + 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 SlotConfigNamesResourceInner object itself. + */ + public SlotConfigNamesResourceInner 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 SlotConfigNamesResourceInner object itself. + */ + public SlotConfigNamesResourceInner withAppSettingNames(List appSettingNames) { + this.appSettingNames = appSettingNames; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SlotDifferenceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SlotDifferenceInner.java new file mode 100644 index 00000000000..c9fcd7484fe --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SlotDifferenceInner.java @@ -0,0 +1,126 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * A setting difference between two deployment slots of an app. + */ +@JsonFlatten +public class SlotDifferenceInner extends ProxyOnlyResource { + /** + * Type of the difference: Information, Warning or Error. + */ + @JsonProperty(value = "properties.type", access = JsonProperty.Access.WRITE_ONLY) + private String slotDifferenceType; + + /** + * The type of the setting: General, AppSetting or ConnectionString. + */ + @JsonProperty(value = "properties.settingType", access = JsonProperty.Access.WRITE_ONLY) + private String settingType; + + /** + * Rule that describes how to process the setting difference during a slot + * swap. + */ + @JsonProperty(value = "properties.diffRule", access = JsonProperty.Access.WRITE_ONLY) + private String diffRule; + + /** + * Name of the setting. + */ + @JsonProperty(value = "properties.settingName", access = JsonProperty.Access.WRITE_ONLY) + private String settingName; + + /** + * Value of the setting in the current slot. + */ + @JsonProperty(value = "properties.valueInCurrentSlot", access = JsonProperty.Access.WRITE_ONLY) + private String valueInCurrentSlot; + + /** + * Value of the setting in the target slot. + */ + @JsonProperty(value = "properties.valueInTargetSlot", access = JsonProperty.Access.WRITE_ONLY) + private String valueInTargetSlot; + + /** + * Description of the setting difference. + */ + @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get the slotDifferenceType value. + * + * @return the slotDifferenceType value + */ + public String slotDifferenceType() { + return this.slotDifferenceType; + } + + /** + * Get the settingType value. + * + * @return the settingType value + */ + public String settingType() { + return this.settingType; + } + + /** + * Get the diffRule value. + * + * @return the diffRule value + */ + public String diffRule() { + return this.diffRule; + } + + /** + * Get the settingName value. + * + * @return the settingName value + */ + public String settingName() { + return this.settingName; + } + + /** + * Get the valueInCurrentSlot value. + * + * @return the valueInCurrentSlot value + */ + public String valueInCurrentSlot() { + return this.valueInCurrentSlot; + } + + /** + * Get the valueInTargetSlot value. + * + * @return the valueInTargetSlot value + */ + public String valueInTargetSlot() { + return this.valueInTargetSlot; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SnapshotInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SnapshotInner.java new file mode 100644 index 00000000000..ff832f52fc5 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SnapshotInner.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * A snapshot of an app. + */ +@JsonFlatten +public class SnapshotInner extends ProxyOnlyResource { + /** + * The time the snapshot was taken. + */ + @JsonProperty(value = "properties.time", access = JsonProperty.Access.WRITE_ONLY) + private String time; + + /** + * Get the time value. + * + * @return the time value + */ + public String time() { + return this.time; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SnapshotRecoveryRequestInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SnapshotRecoveryRequestInner.java new file mode 100644 index 00000000000..b6ebdb40dbb --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SnapshotRecoveryRequestInner.java @@ -0,0 +1,155 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.SnapshotRecoveryTarget; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Details about app recovery operation. + */ +@JsonFlatten +public class SnapshotRecoveryRequestInner extends ProxyOnlyResource { + /** + * Point in time in which the app recovery should be attempted, formatted + * as a DateTime string. + */ + @JsonProperty(value = "properties.snapshotTime") + private String snapshotTime; + + /** + * Specifies the web app that snapshot contents will be written to. + */ + @JsonProperty(value = "properties.recoveryTarget") + private SnapshotRecoveryTarget recoveryTarget; + + /** + * If <code>true</code> the recovery operation can overwrite + * source app; otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.overwrite", required = true) + private boolean overwrite; + + /** + * If true, site configuration, in addition to content, will be reverted. + */ + @JsonProperty(value = "properties.recoverConfiguration") + private Boolean recoverConfiguration; + + /** + * If true, custom hostname conflicts will be ignored when recovering to a + * target web app. + * This setting is only necessary when RecoverConfiguration is enabled. + */ + @JsonProperty(value = "properties.ignoreConflictingHostNames") + private Boolean ignoreConflictingHostNames; + + /** + * Get the snapshotTime value. + * + * @return the snapshotTime value + */ + public String snapshotTime() { + return this.snapshotTime; + } + + /** + * Set the snapshotTime value. + * + * @param snapshotTime the snapshotTime value to set + * @return the SnapshotRecoveryRequestInner object itself. + */ + public SnapshotRecoveryRequestInner withSnapshotTime(String snapshotTime) { + this.snapshotTime = snapshotTime; + return this; + } + + /** + * Get the recoveryTarget value. + * + * @return the recoveryTarget value + */ + public SnapshotRecoveryTarget recoveryTarget() { + return this.recoveryTarget; + } + + /** + * Set the recoveryTarget value. + * + * @param recoveryTarget the recoveryTarget value to set + * @return the SnapshotRecoveryRequestInner object itself. + */ + public SnapshotRecoveryRequestInner withRecoveryTarget(SnapshotRecoveryTarget recoveryTarget) { + this.recoveryTarget = recoveryTarget; + return this; + } + + /** + * Get the overwrite value. + * + * @return the overwrite value + */ + public boolean overwrite() { + return this.overwrite; + } + + /** + * Set the overwrite value. + * + * @param overwrite the overwrite value to set + * @return the SnapshotRecoveryRequestInner object itself. + */ + public SnapshotRecoveryRequestInner withOverwrite(boolean overwrite) { + this.overwrite = overwrite; + return this; + } + + /** + * Get the recoverConfiguration value. + * + * @return the recoverConfiguration value + */ + public Boolean recoverConfiguration() { + return this.recoverConfiguration; + } + + /** + * Set the recoverConfiguration value. + * + * @param recoverConfiguration the recoverConfiguration value to set + * @return the SnapshotRecoveryRequestInner object itself. + */ + public SnapshotRecoveryRequestInner withRecoverConfiguration(Boolean recoverConfiguration) { + this.recoverConfiguration = recoverConfiguration; + return this; + } + + /** + * Get the ignoreConflictingHostNames value. + * + * @return the ignoreConflictingHostNames value + */ + public Boolean ignoreConflictingHostNames() { + return this.ignoreConflictingHostNames; + } + + /** + * Set the ignoreConflictingHostNames value. + * + * @param ignoreConflictingHostNames the ignoreConflictingHostNames value to set + * @return the SnapshotRecoveryRequestInner object itself. + */ + public SnapshotRecoveryRequestInner withIgnoreConflictingHostNames(Boolean ignoreConflictingHostNames) { + this.ignoreConflictingHostNames = ignoreConflictingHostNames; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SourceControlInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SourceControlInner.java new file mode 100644 index 00000000000..15ba16b232e --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/SourceControlInner.java @@ -0,0 +1,151 @@ +/** + * 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.web.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * The source control OAuth token. + */ +@JsonFlatten +public class SourceControlInner extends ProxyOnlyResource { + /** + * Name or source control type. + */ + @JsonProperty(value = "properties.name") + private String sourceControlName; + + /** + * OAuth access token. + */ + @JsonProperty(value = "properties.token") + private String token; + + /** + * OAuth access token secret. + */ + @JsonProperty(value = "properties.tokenSecret") + private String tokenSecret; + + /** + * OAuth refresh token. + */ + @JsonProperty(value = "properties.refreshToken") + private String refreshToken; + + /** + * OAuth token expiration. + */ + @JsonProperty(value = "properties.expirationTime") + private DateTime expirationTime; + + /** + * Get the sourceControlName value. + * + * @return the sourceControlName value + */ + public String sourceControlName() { + return this.sourceControlName; + } + + /** + * Set the sourceControlName value. + * + * @param sourceControlName the sourceControlName value to set + * @return the SourceControlInner object itself. + */ + public SourceControlInner withSourceControlName(String sourceControlName) { + this.sourceControlName = sourceControlName; + return this; + } + + /** + * Get the token value. + * + * @return the token value + */ + public String token() { + return this.token; + } + + /** + * Set the token value. + * + * @param token the token value to set + * @return the SourceControlInner object itself. + */ + public SourceControlInner withToken(String token) { + this.token = token; + return this; + } + + /** + * Get the tokenSecret value. + * + * @return the tokenSecret value + */ + public String tokenSecret() { + return this.tokenSecret; + } + + /** + * Set the tokenSecret value. + * + * @param tokenSecret the tokenSecret value to set + * @return the SourceControlInner object itself. + */ + public SourceControlInner withTokenSecret(String tokenSecret) { + this.tokenSecret = tokenSecret; + return this; + } + + /** + * Get the refreshToken value. + * + * @return the refreshToken value + */ + public String refreshToken() { + return this.refreshToken; + } + + /** + * Set the refreshToken value. + * + * @param refreshToken the refreshToken value to set + * @return the SourceControlInner object itself. + */ + public SourceControlInner withRefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + 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 SourceControlInner object itself. + */ + public SourceControlInner withExpirationTime(DateTime expirationTime) { + this.expirationTime = expirationTime; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/StampCapacityInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/StampCapacityInner.java new file mode 100644 index 00000000000..57f53d28009 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/StampCapacityInner.java @@ -0,0 +1,286 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.ComputeModeOptions; +import com.microsoft.azure.management.web.WorkerSizeOptions; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Stamp capacity information. + */ +public class StampCapacityInner { + /** + * Name of the stamp. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Available capacity (# of machines, bytes of storage etc...). + */ + @JsonProperty(value = "availableCapacity") + private Long availableCapacity; + + /** + * Total capacity (# of machines, bytes of storage etc...). + */ + @JsonProperty(value = "totalCapacity") + private Long totalCapacity; + + /** + * Name of the unit. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Shared/dedicated workers. Possible values include: 'Shared', + * 'Dedicated', 'Dynamic'. + */ + @JsonProperty(value = "computeMode") + private ComputeModeOptions computeMode; + + /** + * Size of the machines. Possible values include: 'Default', 'Small', + * 'Medium', 'Large', 'D1', 'D2', 'D3'. + */ + @JsonProperty(value = "workerSize") + private WorkerSizeOptions workerSize; + + /** + * Size ID of machines: + * 0 - Small + * 1 - Medium + * 2 - Large. + */ + @JsonProperty(value = "workerSizeId") + private Integer workerSizeId; + + /** + * If <code>true</code>, it includes basic apps. + * Basic apps are not used for capacity allocation. + */ + @JsonProperty(value = "excludeFromCapacityAllocation") + private Boolean excludeFromCapacityAllocation; + + /** + * <code>true</code> if capacity is applicable for all apps; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "isApplicableForAllComputeModes") + private Boolean isApplicableForAllComputeModes; + + /** + * Shared or Dedicated. + */ + @JsonProperty(value = "siteMode") + private String siteMode; + + /** + * 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 StampCapacityInner object itself. + */ + public StampCapacityInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the availableCapacity value. + * + * @return the availableCapacity value + */ + public Long availableCapacity() { + return this.availableCapacity; + } + + /** + * Set the availableCapacity value. + * + * @param availableCapacity the availableCapacity value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withAvailableCapacity(Long availableCapacity) { + this.availableCapacity = availableCapacity; + return this; + } + + /** + * Get the totalCapacity value. + * + * @return the totalCapacity value + */ + public Long totalCapacity() { + return this.totalCapacity; + } + + /** + * Set the totalCapacity value. + * + * @param totalCapacity the totalCapacity value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withTotalCapacity(Long totalCapacity) { + this.totalCapacity = totalCapacity; + return this; + } + + /** + * Get the unit value. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit value. + * + * @param unit the unit value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the computeMode value. + * + * @return the computeMode value + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Set the computeMode value. + * + * @param computeMode the computeMode value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withComputeMode(ComputeModeOptions computeMode) { + this.computeMode = computeMode; + return this; + } + + /** + * Get the workerSize value. + * + * @return the workerSize value + */ + public WorkerSizeOptions workerSize() { + return this.workerSize; + } + + /** + * Set the workerSize value. + * + * @param workerSize the workerSize value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withWorkerSize(WorkerSizeOptions workerSize) { + this.workerSize = workerSize; + return this; + } + + /** + * Get the workerSizeId value. + * + * @return the workerSizeId value + */ + public Integer workerSizeId() { + return this.workerSizeId; + } + + /** + * Set the workerSizeId value. + * + * @param workerSizeId the workerSizeId value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withWorkerSizeId(Integer workerSizeId) { + this.workerSizeId = workerSizeId; + return this; + } + + /** + * Get the excludeFromCapacityAllocation value. + * + * @return the excludeFromCapacityAllocation value + */ + public Boolean excludeFromCapacityAllocation() { + return this.excludeFromCapacityAllocation; + } + + /** + * Set the excludeFromCapacityAllocation value. + * + * @param excludeFromCapacityAllocation the excludeFromCapacityAllocation value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withExcludeFromCapacityAllocation(Boolean excludeFromCapacityAllocation) { + this.excludeFromCapacityAllocation = excludeFromCapacityAllocation; + return this; + } + + /** + * Get the isApplicableForAllComputeModes value. + * + * @return the isApplicableForAllComputeModes value + */ + public Boolean isApplicableForAllComputeModes() { + return this.isApplicableForAllComputeModes; + } + + /** + * Set the isApplicableForAllComputeModes value. + * + * @param isApplicableForAllComputeModes the isApplicableForAllComputeModes value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withIsApplicableForAllComputeModes(Boolean isApplicableForAllComputeModes) { + this.isApplicableForAllComputeModes = isApplicableForAllComputeModes; + return this; + } + + /** + * Get the siteMode value. + * + * @return the siteMode value + */ + public String siteMode() { + return this.siteMode; + } + + /** + * Set the siteMode value. + * + * @param siteMode the siteMode value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withSiteMode(String siteMode) { + this.siteMode = siteMode; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/StorageMigrationOptionsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/StorageMigrationOptionsInner.java new file mode 100644 index 00000000000..86bad761045 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/StorageMigrationOptionsInner.java @@ -0,0 +1,126 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Options for app content migration. + */ +@JsonFlatten +public class StorageMigrationOptionsInner extends ProxyOnlyResource { + /** + * AzureFiles connection string. + */ + @JsonProperty(value = "properties.azurefilesConnectionString", required = true) + private String azurefilesConnectionString; + + /** + * AzureFiles share. + */ + @JsonProperty(value = "properties.azurefilesShare", required = true) + private String azurefilesShare; + + /** + * <code>true</code>if the app should be switched over; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.switchSiteAfterMigration") + private Boolean switchSiteAfterMigration; + + /** + * <code>true</code> if the app should be read only during copy + * operation; otherwise, <code>false</code>. + */ + @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-web/src/main/java/com/microsoft/azure/management/web/implementation/StorageMigrationResponseInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/StorageMigrationResponseInner.java new file mode 100644 index 00000000000..6987d667db7 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/StorageMigrationResponseInner.java @@ -0,0 +1,36 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Response for a migration of app content request. + */ +@JsonFlatten +public class StorageMigrationResponseInner extends ProxyOnlyResource { + /** + * When server starts the migration process, it will return an operation ID + * identifying that particular migration operation. + */ + @JsonProperty(value = "properties.operationId", access = JsonProperty.Access.WRITE_ONLY) + private String operationId; + + /** + * Get the operationId value. + * + * @return the operationId value + */ + public String operationId() { + return this.operationId; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/StringDictionaryInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/StringDictionaryInner.java new file mode 100644 index 00000000000..e2ba7d0853e --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/StringDictionaryInner.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * String dictionary resource. + */ +public class StringDictionaryInner extends ProxyOnlyResource { + /** + * Settings. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the properties value. + * + * @return the properties value + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties value. + * + * @param properties the properties value to set + * @return the StringDictionaryInner object itself. + */ + public StringDictionaryInner withProperties(Map properties) { + this.properties = properties; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TldLegalAgreementInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TldLegalAgreementInner.java new file mode 100644 index 00000000000..7bc683ef1c4 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TldLegalAgreementInner.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Legal agreement for a top level domain. + */ +public class TldLegalAgreementInner { + /** + * Unique identifier for the agreement. + */ + @JsonProperty(value = "agreementKey", required = true) + private String agreementKey; + + /** + * Agreement title. + */ + @JsonProperty(value = "title", required = true) + private String title; + + /** + * Agreement details. + */ + @JsonProperty(value = "content", required = true) + private String content; + + /** + * URL where a copy of the agreement details is hosted. + */ + @JsonProperty(value = "url") + private String url; + + /** + * Get the agreementKey value. + * + * @return the agreementKey value + */ + public String agreementKey() { + return this.agreementKey; + } + + /** + * Set the agreementKey value. + * + * @param agreementKey the agreementKey value to set + * @return the TldLegalAgreementInner object itself. + */ + public TldLegalAgreementInner withAgreementKey(String agreementKey) { + this.agreementKey = agreementKey; + return this; + } + + /** + * Get the title value. + * + * @return the title value + */ + public String title() { + return this.title; + } + + /** + * Set the title value. + * + * @param title the title value to set + * @return the TldLegalAgreementInner object itself. + */ + public TldLegalAgreementInner withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the content value. + * + * @return the content value + */ + public String content() { + return this.content; + } + + /** + * Set the content value. + * + * @param content the content value to set + * @return the TldLegalAgreementInner object itself. + */ + public TldLegalAgreementInner withContent(String content) { + this.content = content; + return this; + } + + /** + * Get the url value. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set the url value. + * + * @param url the url value to set + * @return the TldLegalAgreementInner object itself. + */ + public TldLegalAgreementInner withUrl(String url) { + this.url = url; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TopLevelDomainAgreementOptionInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TopLevelDomainAgreementOptionInner.java new file mode 100644 index 00000000000..50a3497bc3a --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TopLevelDomainAgreementOptionInner.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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Options for retrieving the list of top level domain legal agreements. + */ +public class TopLevelDomainAgreementOptionInner { + /** + * If <code>true</code>, then the list of agreements will + * include agreements for domain privacy as well; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "includePrivacy") + private Boolean includePrivacy; + + /** + * If <code>true</code>, then the list of agreements will + * include agreements for domain transfer as well; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "forTransfer") + private Boolean forTransfer; + + /** + * Get the includePrivacy value. + * + * @return the includePrivacy value + */ + public Boolean includePrivacy() { + return this.includePrivacy; + } + + /** + * Set the includePrivacy value. + * + * @param includePrivacy the includePrivacy value to set + * @return the TopLevelDomainAgreementOptionInner object itself. + */ + public TopLevelDomainAgreementOptionInner withIncludePrivacy(Boolean includePrivacy) { + this.includePrivacy = includePrivacy; + return this; + } + + /** + * Get the forTransfer value. + * + * @return the forTransfer value + */ + public Boolean forTransfer() { + return this.forTransfer; + } + + /** + * Set the forTransfer value. + * + * @param forTransfer the forTransfer value to set + * @return the TopLevelDomainAgreementOptionInner object itself. + */ + public TopLevelDomainAgreementOptionInner withForTransfer(Boolean forTransfer) { + this.forTransfer = forTransfer; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TopLevelDomainInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TopLevelDomainInner.java new file mode 100644 index 00000000000..e517c07c629 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TopLevelDomainInner.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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * A top level domain object. + */ +@JsonFlatten +public class TopLevelDomainInner extends ProxyOnlyResource { + /** + * Name of the top level domain. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private String domainName; + + /** + * If <code>true</code>, then the top level domain supports + * domain privacy; otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.privacy") + private Boolean privacy; + + /** + * Get the domainName value. + * + * @return the domainName value + */ + public String domainName() { + return this.domainName; + } + + /** + * Get the privacy value. + * + * @return the privacy value + */ + public Boolean privacy() { + return this.privacy; + } + + /** + * Set the privacy value. + * + * @param privacy the privacy value to set + * @return the TopLevelDomainInner object itself. + */ + public TopLevelDomainInner withPrivacy(Boolean privacy) { + this.privacy = privacy; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TopLevelDomainsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TopLevelDomainsInner.java new file mode 100644 index 00000000000..f3d49c06c78 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TopLevelDomainsInner.java @@ -0,0 +1,635 @@ +/** + * 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.web.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in TopLevelDomains. + */ +public class TopLevelDomainsInner { + /** The Retrofit service to perform REST calls. */ + private TopLevelDomainsService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * Initializes an instance of TopLevelDomainsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public TopLevelDomainsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(TopLevelDomainsService.class); + this.client = client; + } + + /** + * The interface defining all the services for TopLevelDomains to be + * used by Retrofit to perform actually REST calls. + */ + interface TopLevelDomainsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.TopLevelDomains list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.TopLevelDomains get" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.TopLevelDomains listAgreements" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") + Observable> listAgreements(@Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body TopLevelDomainAgreementOptionInner agreementOption, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.TopLevelDomains listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.TopLevelDomains listAgreementsNext" }) + @GET + Observable> listAgreementsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all top-level domains supported for registration. + * Get all top-level domains supported for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TopLevelDomainInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all top-level domains supported for registration. + * Get all top-level domains supported for registration. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all top-level domains supported for registration. + * Get all top-level domains supported for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopLevelDomainInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all top-level domains supported for registration. + * Get all top-level domains supported for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopLevelDomainInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all top-level domains supported for registration. + * Get all top-level domains supported for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TopLevelDomainInner> 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 = "2015-04-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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get details of a top-level domain. + * Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TopLevelDomainInner object if successful. + */ + public TopLevelDomainInner get(String name) { + return getWithServiceResponseAsync(name).toBlocking().single().body(); + } + + /** + * Get details of a top-level domain. + * Get 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(name), serviceCallback); + } + + /** + * Get details of a top-level domain. + * Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopLevelDomainInner object + */ + public Observable getAsync(String name) { + return getWithServiceResponseAsync(name).map(new Func1, TopLevelDomainInner>() { + @Override + public TopLevelDomainInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get details of a top-level domain. + * Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TopLevelDomainInner object + */ + 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."); + } + final String apiVersion = "2015-04-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 = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TldLegalAgreementInner> object if successful. + */ + public PagedList listAgreements(final String name, final TopLevelDomainAgreementOptionInner agreementOption) { + ServiceResponse> response = listAgreementsSinglePageAsync(name, agreementOption).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAgreementsAsync(final String name, final TopLevelDomainAgreementOptionInner agreementOption, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAgreementsSinglePageAsync(name, agreementOption), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAgreementsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TldLegalAgreementInner> object + */ + public Observable> listAgreementsAsync(final String name, final TopLevelDomainAgreementOptionInner agreementOption) { + return listAgreementsWithServiceResponseAsync(name, agreementOption) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TldLegalAgreementInner> object + */ + public Observable>> listAgreementsWithServiceResponseAsync(final String name, final TopLevelDomainAgreementOptionInner agreementOption) { + return listAgreementsSinglePageAsync(name, agreementOption) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAgreementsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Gets all legal agreements that user needs to accept before purchasing a domain. + * + ServiceResponse> * @param name Name of the top-level domain. + ServiceResponse> * @param agreementOption Domain agreement options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TldLegalAgreementInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAgreementsSinglePageAsync(final String name, final TopLevelDomainAgreementOptionInner agreementOption) { + 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 (agreementOption == null) { + throw new IllegalArgumentException("Parameter agreementOption is required and cannot be null."); + } + Validator.validate(agreementOption); + final String apiVersion = "2015-04-01"; + return service.listAgreements(name, this.client.subscriptionId(), agreementOption, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAgreementsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAgreementsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all top-level domains supported for registration. + * Get all top-level domains supported for registration. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TopLevelDomainInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all top-level domains supported for registration. + * Get all top-level domains supported for registration. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all top-level domains supported for registration. + * Get all top-level domains supported for registration. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopLevelDomainInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all top-level domains supported for registration. + * Get all top-level domains supported for registration. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TopLevelDomainInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all top-level domains supported for registration. + * Get all top-level domains supported for registration. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TopLevelDomainInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TldLegalAgreementInner> object if successful. + */ + public PagedList listAgreementsNext(final String nextPageLink) { + ServiceResponse> response = listAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAgreementsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAgreementsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAgreementsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TldLegalAgreementInner> object + */ + public Observable> listAgreementsNextAsync(final String nextPageLink) { + return listAgreementsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TldLegalAgreementInner> object + */ + public Observable>> listAgreementsNextWithServiceResponseAsync(final String nextPageLink) { + return listAgreementsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAgreementsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Gets all legal agreements that user needs to accept before purchasing a domain. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TldLegalAgreementInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAgreementsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listAgreementsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAgreementsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAgreementsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TriggeredJobHistoryInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TriggeredJobHistoryInner.java new file mode 100644 index 00000000000..40a2883654c --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TriggeredJobHistoryInner.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import java.util.List; +import com.microsoft.azure.management.web.TriggeredJobRun; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Triggered Web Job History. List of Triggered Web Job Run Information + * elements. + */ +@JsonFlatten +public class TriggeredJobHistoryInner extends ProxyOnlyResource { + /** + * List of triggered web job runs. + */ + @JsonProperty(value = "properties.triggeredJobRuns") + private List triggeredJobRuns; + + /** + * Get the triggeredJobRuns value. + * + * @return the triggeredJobRuns value + */ + public List triggeredJobRuns() { + return this.triggeredJobRuns; + } + + /** + * Set the triggeredJobRuns value. + * + * @param triggeredJobRuns the triggeredJobRuns value to set + * @return the TriggeredJobHistoryInner object itself. + */ + public TriggeredJobHistoryInner withTriggeredJobRuns(List triggeredJobRuns) { + this.triggeredJobRuns = triggeredJobRuns; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TriggeredWebJobInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TriggeredWebJobInner.java new file mode 100644 index 00000000000..e6fbf1eba49 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/TriggeredWebJobInner.java @@ -0,0 +1,298 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.TriggeredJobRun; +import com.microsoft.azure.management.web.WebJobType; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Triggered Web Job Information. + */ +@JsonFlatten +public class TriggeredWebJobInner extends ProxyOnlyResource { + /** + * Latest job run information. + */ + @JsonProperty(value = "properties.latestRun") + private TriggeredJobRun latestRun; + + /** + * History URL. + */ + @JsonProperty(value = "properties.historyUrl") + private String historyUrl; + + /** + * Scheduler Logs URL. + */ + @JsonProperty(value = "properties.schedulerLogsUrl") + private String schedulerLogsUrl; + + /** + * Job name. Used as job identifier in ARM resource URI. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private String triggeredWebJobName; + + /** + * Run command. + */ + @JsonProperty(value = "properties.runCommand") + private String runCommand; + + /** + * Job URL. + */ + @JsonProperty(value = "properties.url") + private String url; + + /** + * Extra Info URL. + */ + @JsonProperty(value = "properties.extraInfoUrl") + private String extraInfoUrl; + + /** + * Job type. Possible values include: 'Continuous', 'Triggered'. + */ + @JsonProperty(value = "properties.jobType") + private WebJobType jobType; + + /** + * Error information. + */ + @JsonProperty(value = "properties.error") + private String error; + + /** + * Using SDK?. + */ + @JsonProperty(value = "properties.usingSdk") + private Boolean usingSdk; + + /** + * Job settings. + */ + @JsonProperty(value = "properties.settings") + private Map settings; + + /** + * Get the latestRun value. + * + * @return the latestRun value + */ + public TriggeredJobRun latestRun() { + return this.latestRun; + } + + /** + * Set the latestRun value. + * + * @param latestRun the latestRun value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withLatestRun(TriggeredJobRun latestRun) { + this.latestRun = latestRun; + return this; + } + + /** + * Get the historyUrl value. + * + * @return the historyUrl value + */ + public String historyUrl() { + return this.historyUrl; + } + + /** + * Set the historyUrl value. + * + * @param historyUrl the historyUrl value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withHistoryUrl(String historyUrl) { + this.historyUrl = historyUrl; + return this; + } + + /** + * Get the schedulerLogsUrl value. + * + * @return the schedulerLogsUrl value + */ + public String schedulerLogsUrl() { + return this.schedulerLogsUrl; + } + + /** + * Set the schedulerLogsUrl value. + * + * @param schedulerLogsUrl the schedulerLogsUrl value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withSchedulerLogsUrl(String schedulerLogsUrl) { + this.schedulerLogsUrl = schedulerLogsUrl; + return this; + } + + /** + * Get the triggeredWebJobName value. + * + * @return the triggeredWebJobName value + */ + public String triggeredWebJobName() { + return this.triggeredWebJobName; + } + + /** + * Get the runCommand value. + * + * @return the runCommand value + */ + public String runCommand() { + return this.runCommand; + } + + /** + * Set the runCommand value. + * + * @param runCommand the runCommand value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withRunCommand(String runCommand) { + this.runCommand = runCommand; + return this; + } + + /** + * Get the url value. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set the url value. + * + * @param url the url value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the extraInfoUrl value. + * + * @return the extraInfoUrl value + */ + public String extraInfoUrl() { + return this.extraInfoUrl; + } + + /** + * Set the extraInfoUrl value. + * + * @param extraInfoUrl the extraInfoUrl value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withExtraInfoUrl(String extraInfoUrl) { + this.extraInfoUrl = extraInfoUrl; + return this; + } + + /** + * Get the jobType value. + * + * @return the jobType value + */ + public WebJobType jobType() { + return this.jobType; + } + + /** + * Set the jobType value. + * + * @param jobType the jobType value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withJobType(WebJobType jobType) { + this.jobType = jobType; + return this; + } + + /** + * Get the error value. + * + * @return the error value + */ + public String error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withError(String error) { + this.error = error; + return this; + } + + /** + * Get the usingSdk value. + * + * @return the usingSdk value + */ + public Boolean usingSdk() { + return this.usingSdk; + } + + /** + * Set the usingSdk value. + * + * @param usingSdk the usingSdk value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withUsingSdk(Boolean usingSdk) { + this.usingSdk = usingSdk; + return this; + } + + /** + * Get the settings value. + * + * @return the settings value + */ + public Map settings() { + return this.settings; + } + + /** + * Set the settings value. + * + * @param settings the settings value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withSettings(Map settings) { + this.settings = settings; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/UsageInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/UsageInner.java new file mode 100644 index 00000000000..3f556e22d51 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/UsageInner.java @@ -0,0 +1,158 @@ +/** + * 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.web.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.web.ComputeModeOptions; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Usage of the quota resource. + */ +@JsonFlatten +public class UsageInner extends ProxyOnlyResource { + /** + * Friendly name shown in the UI. + */ + @JsonProperty(value = "properties.displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /** + * Name of the quota. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private String usageName; + + /** + * Name of the quota resource. + */ + @JsonProperty(value = "properties.resourceName", access = JsonProperty.Access.WRITE_ONLY) + private String resourceName; + + /** + * Units of measurement for the quota resource. + */ + @JsonProperty(value = "properties.unit", access = JsonProperty.Access.WRITE_ONLY) + private String unit; + + /** + * The current value of the resource counter. + */ + @JsonProperty(value = "properties.currentValue", access = JsonProperty.Access.WRITE_ONLY) + private Long currentValue; + + /** + * The resource limit. + */ + @JsonProperty(value = "properties.limit", access = JsonProperty.Access.WRITE_ONLY) + private Long limit; + + /** + * Next reset time for the resource counter. + */ + @JsonProperty(value = "properties.nextResetTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime nextResetTime; + + /** + * Compute mode used for this usage. Possible values include: 'Shared', + * 'Dedicated', 'Dynamic'. + */ + @JsonProperty(value = "properties.computeMode", access = JsonProperty.Access.WRITE_ONLY) + private ComputeModeOptions computeMode; + + /** + * Site mode used for this usage. + */ + @JsonProperty(value = "properties.siteMode", access = JsonProperty.Access.WRITE_ONLY) + private String siteMode; + + /** + * Get the displayName value. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the usageName value. + * + * @return the usageName value + */ + public String usageName() { + return this.usageName; + } + + /** + * Get the resourceName value. + * + * @return the resourceName value + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Get the unit value. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Get the currentValue value. + * + * @return the currentValue value + */ + public Long currentValue() { + return this.currentValue; + } + + /** + * Get the limit value. + * + * @return the limit value + */ + public Long limit() { + return this.limit; + } + + /** + * Get the nextResetTime value. + * + * @return the nextResetTime value + */ + public DateTime nextResetTime() { + return this.nextResetTime; + } + + /** + * Get the computeMode value. + * + * @return the computeMode value + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Get the siteMode value. + * + * @return the siteMode value + */ + public String siteMode() { + return this.siteMode; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/UserInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/UserInner.java new file mode 100644 index 00000000000..a52a3561d14 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/UserInner.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * User crendentials used for publishing activity. + */ +@JsonFlatten +public class UserInner extends ProxyOnlyResource { + /** + * Username. + */ + @JsonProperty(value = "properties.name") + private String userName; + + /** + * Username used for publishing. + */ + @JsonProperty(value = "properties.publishingUserName", required = true) + private String publishingUserName; + + /** + * Password used for publishing. + */ + @JsonProperty(value = "properties.publishingPassword") + private String publishingPassword; + + /** + * Password hash used for publishing. + */ + @JsonProperty(value = "properties.publishingPasswordHash") + private String publishingPasswordHash; + + /** + * Password hash salt used for publishing. + */ + @JsonProperty(value = "properties.publishingPasswordHashSalt") + private String publishingPasswordHashSalt; + + /** + * Get the userName value. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Set the userName value. + * + * @param userName the userName value to set + * @return the UserInner object itself. + */ + public UserInner withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get the publishingUserName value. + * + * @return the publishingUserName value + */ + public String publishingUserName() { + return this.publishingUserName; + } + + /** + * Set the publishingUserName value. + * + * @param publishingUserName the publishingUserName value to set + * @return the UserInner object itself. + */ + public UserInner withPublishingUserName(String publishingUserName) { + this.publishingUserName = publishingUserName; + return this; + } + + /** + * 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 UserInner object itself. + */ + public UserInner withPublishingPassword(String publishingPassword) { + this.publishingPassword = publishingPassword; + return this; + } + + /** + * 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 publishingPasswordHashSalt value + */ + public String publishingPasswordHashSalt() { + return this.publishingPasswordHashSalt; + } + + /** + * Set the publishingPasswordHashSalt value. + * + * @param publishingPasswordHashSalt the publishingPasswordHashSalt value to set + * @return the UserInner object itself. + */ + public UserInner withPublishingPasswordHashSalt(String publishingPasswordHashSalt) { + this.publishingPasswordHashSalt = publishingPasswordHashSalt; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ValidateRequestInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ValidateRequestInner.java new file mode 100644 index 00000000000..26c90b72714 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ValidateRequestInner.java @@ -0,0 +1,258 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.ValidateResourceTypes; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Resource validation request content. + */ +@JsonFlatten +public class ValidateRequestInner { + /** + * Resource name to verify. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Resource type used for verification. Possible values include: + * 'ServerFarm', 'Site'. + */ + @JsonProperty(value = "type", required = true) + private ValidateResourceTypes type; + + /** + * Expected location of the resource. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * ARM resource ID of an App Service plan that would host the app. + */ + @JsonProperty(value = "properties.serverFarmId") + private String serverFarmId; + + /** + * Name of the target SKU for the App Service plan. + */ + @JsonProperty(value = "properties.skuName") + private String skuName; + + /** + * <code>true</code> if App Service plan is for Linux workers; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.needLinuxWorkers") + private Boolean needLinuxWorkers; + + /** + * <code>true</code> if App Service plan is for Spot instances; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.isSpot") + private Boolean isSpot; + + /** + * Target capacity of the App Service plan (number of VM's). + */ + @JsonProperty(value = "properties.capacity") + private Integer capacity; + + /** + * Name of App Service Environment where app or App Service plan should be + * created. + */ + @JsonProperty(value = "properties.hostingEnvironment") + private String hostingEnvironment; + + /** + * 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 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 ValidateRequestInner object itself. + */ + public ValidateRequestInner 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 ValidateRequestInner object itself. + */ + public ValidateRequestInner withSkuName(String skuName) { + this.skuName = skuName; + return this; + } + + /** + * Get the needLinuxWorkers value. + * + * @return the needLinuxWorkers value + */ + public Boolean needLinuxWorkers() { + return this.needLinuxWorkers; + } + + /** + * Set the needLinuxWorkers value. + * + * @param needLinuxWorkers the needLinuxWorkers value to set + * @return the ValidateRequestInner object itself. + */ + public ValidateRequestInner withNeedLinuxWorkers(Boolean needLinuxWorkers) { + this.needLinuxWorkers = needLinuxWorkers; + return this; + } + + /** + * Get the isSpot value. + * + * @return the isSpot value + */ + public Boolean isSpot() { + return this.isSpot; + } + + /** + * Set the isSpot value. + * + * @param isSpot the isSpot value to set + * @return the ValidateRequestInner object itself. + */ + public ValidateRequestInner withIsSpot(Boolean isSpot) { + this.isSpot = isSpot; + 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 ValidateRequestInner object itself. + */ + public ValidateRequestInner 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 ValidateRequestInner object itself. + */ + public ValidateRequestInner withHostingEnvironment(String hostingEnvironment) { + this.hostingEnvironment = hostingEnvironment; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ValidateResponseInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ValidateResponseInner.java new file mode 100644 index 00000000000..9d7ae243548 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/ValidateResponseInner.java @@ -0,0 +1,70 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.ValidateResponseError; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the result of resource validation. + */ +public class ValidateResponseInner { + /** + * Result of validation. + */ + @JsonProperty(value = "status") + private String status; + + /** + * Error details for the case when validation fails. + */ + @JsonProperty(value = "error") + 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-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetGatewayInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetGatewayInner.java new file mode 100644 index 00000000000..161dc48d3f0 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetGatewayInner.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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * The Virtual Network gateway contract. This is used to give the Virtual + * Network gateway access to the VPN package. + */ +@JsonFlatten +public class VnetGatewayInner extends ProxyOnlyResource { + /** + * The Virtual Network name. + */ + @JsonProperty(value = "properties.vnetName") + private String vnetName; + + /** + * The URI where the VPN package can be downloaded. + */ + @JsonProperty(value = "properties.vpnPackageUri", required = true) + private String vpnPackageUri; + + /** + * Get the vnetName value. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the vnetName value. + * + * @param vnetName the vnetName value to set + * @return the VnetGatewayInner object itself. + */ + public VnetGatewayInner withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the vpnPackageUri value. + * + * @return the vpnPackageUri value + */ + public String vpnPackageUri() { + return this.vpnPackageUri; + } + + /** + * Set the vpnPackageUri value. + * + * @param vpnPackageUri the vpnPackageUri value to set + * @return the VnetGatewayInner object itself. + */ + public VnetGatewayInner withVpnPackageUri(String vpnPackageUri) { + this.vpnPackageUri = vpnPackageUri; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetInfoInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetInfoInner.java new file mode 100644 index 00000000000..dfb27bd5600 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetInfoInner.java @@ -0,0 +1,148 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Virtual Network information contract. + */ +@JsonFlatten +public class VnetInfoInner extends ProxyOnlyResource { + /** + * The Virtual Network's resource ID. + */ + @JsonProperty(value = "properties.vnetResourceId") + private String vnetResourceId; + + /** + * The client certificate thumbprint. + */ + @JsonProperty(value = "properties.certThumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String certThumbprint; + + /** + * A certificate file (.cer) blob containing the public key of the private + * key used to authenticate a + * Point-To-Site VPN connection. + */ + @JsonProperty(value = "properties.certBlob") + private byte[] certBlob; + + /** + * The routes that this Virtual Network connection uses. + */ + @JsonProperty(value = "properties.routes", access = JsonProperty.Access.WRITE_ONLY) + private List routes; + + /** + * <code>true</code> if a resync is required; otherwise, + * <code>false</code>. + */ + @JsonProperty(value = "properties.resyncRequired", access = JsonProperty.Access.WRITE_ONLY) + private Boolean resyncRequired; + + /** + * DNS servers to be used by this Virtual Network. This should be a + * comma-separated list of IP addresses. + */ + @JsonProperty(value = "properties.dnsServers") + private String dnsServers; + + /** + * Get the vnetResourceId value. + * + * @return the vnetResourceId value + */ + public String vnetResourceId() { + return this.vnetResourceId; + } + + /** + * Set the vnetResourceId value. + * + * @param vnetResourceId the vnetResourceId value to set + * @return the VnetInfoInner object itself. + */ + public VnetInfoInner withVnetResourceId(String vnetResourceId) { + this.vnetResourceId = vnetResourceId; + return this; + } + + /** + * Get the certThumbprint value. + * + * @return the certThumbprint value + */ + public String certThumbprint() { + return this.certThumbprint; + } + + /** + * Get the certBlob value. + * + * @return the certBlob value + */ + public byte[] certBlob() { + return this.certBlob; + } + + /** + * Set the certBlob value. + * + * @param certBlob the certBlob value to set + * @return the VnetInfoInner object itself. + */ + public VnetInfoInner withCertBlob(byte[] certBlob) { + this.certBlob = certBlob; + return this; + } + + /** + * Get the routes value. + * + * @return the routes value + */ + public List routes() { + return this.routes; + } + + /** + * Get the resyncRequired value. + * + * @return the resyncRequired value + */ + public Boolean resyncRequired() { + return this.resyncRequired; + } + + /** + * Get the dnsServers value. + * + * @return the dnsServers value + */ + public String dnsServers() { + return this.dnsServers; + } + + /** + * Set the dnsServers value. + * + * @param dnsServers the dnsServers value to set + * @return the VnetInfoInner object itself. + */ + public VnetInfoInner withDnsServers(String dnsServers) { + this.dnsServers = dnsServers; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetParametersInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetParametersInner.java new file mode 100644 index 00000000000..6c3ee57de11 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetParametersInner.java @@ -0,0 +1,98 @@ +/** + * 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.web.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * The required set of inputs to validate a VNET. + */ +@JsonFlatten +public class VnetParametersInner extends ProxyOnlyResource { + /** + * The Resource Group of the VNET to be validated. + */ + @JsonProperty(value = "properties.vnetResourceGroup") + private String vnetResourceGroup; + + /** + * The name of the VNET to be validated. + */ + @JsonProperty(value = "properties.vnetName") + private String vnetName; + + /** + * The subnet name to be validated. + */ + @JsonProperty(value = "properties.vnetSubnetName") + private String vnetSubnetName; + + /** + * Get the vnetResourceGroup value. + * + * @return the vnetResourceGroup value + */ + public String vnetResourceGroup() { + return this.vnetResourceGroup; + } + + /** + * Set the vnetResourceGroup value. + * + * @param vnetResourceGroup the vnetResourceGroup value to set + * @return the VnetParametersInner object itself. + */ + public VnetParametersInner withVnetResourceGroup(String vnetResourceGroup) { + this.vnetResourceGroup = vnetResourceGroup; + return this; + } + + /** + * Get the vnetName value. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the vnetName value. + * + * @param vnetName the vnetName value to set + * @return the VnetParametersInner object itself. + */ + public VnetParametersInner withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the vnetSubnetName value. + * + * @return the vnetSubnetName value + */ + public String vnetSubnetName() { + return this.vnetSubnetName; + } + + /** + * Set the vnetSubnetName value. + * + * @param vnetSubnetName the vnetSubnetName value to set + * @return the VnetParametersInner object itself. + */ + public VnetParametersInner withVnetSubnetName(String vnetSubnetName) { + this.vnetSubnetName = vnetSubnetName; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetRouteInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetRouteInner.java new file mode 100644 index 00000000000..98fbe35e579 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetRouteInner.java @@ -0,0 +1,137 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.RouteType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Virtual Network route contract used to pass routing information for a + * Virtual Network. + */ +@JsonFlatten +public class VnetRouteInner extends ProxyOnlyResource { + /** + * The name of this route. This is only returned by the server and does not + * need to be set by the client. + */ + @JsonProperty(value = "properties.name") + private String vnetRouteName; + + /** + * The starting address for this route. This may also include a CIDR + * notation, in which case the end address must not be specified. + */ + @JsonProperty(value = "properties.startAddress") + private String startAddress; + + /** + * The ending address for this route. If the start address is specified in + * CIDR notation, this must be omitted. + */ + @JsonProperty(value = "properties.endAddress") + private String endAddress; + + /** + * The type of route this is: + * DEFAULT - By default, every app has routes to the local address ranges + * specified by RFC1918 + * INHERITED - Routes inherited from the real Virtual Network routes + * STATIC - Static route set on the app only + * + * These values will be used for syncing an app's routes with those from a + * Virtual Network. Possible values include: 'DEFAULT', 'INHERITED', + * 'STATIC'. + */ + @JsonProperty(value = "properties.routeType") + private RouteType routeType; + + /** + * Get the vnetRouteName value. + * + * @return the vnetRouteName value + */ + public String vnetRouteName() { + return this.vnetRouteName; + } + + /** + * Set the vnetRouteName value. + * + * @param vnetRouteName the vnetRouteName value to set + * @return the VnetRouteInner object itself. + */ + public VnetRouteInner withVnetRouteName(String vnetRouteName) { + this.vnetRouteName = vnetRouteName; + return this; + } + + /** + * Get the startAddress value. + * + * @return the startAddress value + */ + public String startAddress() { + return this.startAddress; + } + + /** + * Set the startAddress value. + * + * @param startAddress the startAddress value to set + * @return the VnetRouteInner object itself. + */ + public VnetRouteInner withStartAddress(String startAddress) { + this.startAddress = startAddress; + return this; + } + + /** + * Get the endAddress value. + * + * @return the endAddress value + */ + public String endAddress() { + return this.endAddress; + } + + /** + * Set the endAddress value. + * + * @param endAddress the endAddress value to set + * @return the VnetRouteInner object itself. + */ + public VnetRouteInner withEndAddress(String endAddress) { + this.endAddress = endAddress; + return this; + } + + /** + * Get the routeType value. + * + * @return the routeType value + */ + public RouteType routeType() { + return this.routeType; + } + + /** + * Set the routeType value. + * + * @param routeType the routeType value to set + * @return the VnetRouteInner object itself. + */ + public VnetRouteInner withRouteType(RouteType routeType) { + this.routeType = routeType; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetValidationFailureDetailsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetValidationFailureDetailsInner.java new file mode 100644 index 00000000000..5f122244767 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/VnetValidationFailureDetailsInner.java @@ -0,0 +1,74 @@ +/** + * 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.web.implementation; + +import java.util.List; +import com.microsoft.azure.management.web.VnetValidationTestFailure; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * A class that describes the reason for a validation failure. + */ +@JsonFlatten +public class VnetValidationFailureDetailsInner extends ProxyOnlyResource { + /** + * A flag describing whether or not validation failed. + */ + @JsonProperty(value = "properties.failed") + private Boolean failed; + + /** + * A list of tests that failed in the validation. + */ + @JsonProperty(value = "properties.failedTests") + private List failedTests; + + /** + * Get the failed value. + * + * @return the failed value + */ + public Boolean failed() { + return this.failed; + } + + /** + * Set the failed value. + * + * @param failed the failed value to set + * @return the VnetValidationFailureDetailsInner object itself. + */ + public VnetValidationFailureDetailsInner withFailed(Boolean failed) { + this.failed = failed; + return this; + } + + /** + * Get the failedTests value. + * + * @return the failedTests value + */ + public List failedTests() { + return this.failedTests; + } + + /** + * Set the failedTests value. + * + * @param failedTests the failedTests value to set + * @return the VnetValidationFailureDetailsInner object itself. + */ + public VnetValidationFailureDetailsInner withFailedTests(List failedTests) { + this.failedTests = failedTests; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WebAppsInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WebAppsInner.java new file mode 100644 index 00000000000..c9ce727a47d --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WebAppsInner.java @@ -0,0 +1,44992 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.web.CsmPublishingProfileOptions; +import com.microsoft.azure.management.web.PublishingProfileFormat; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.InputStream; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Streaming; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in WebApps. + */ +public class WebAppsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private WebAppsService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * 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 WebAppsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(WebAppsService.class); + this.client = client; + } + + /** + * The interface defining all the services for WebApps to be + * used by Retrofit to perform actually REST calls. + */ + interface WebAppsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps list" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") + Observable> getByResourceGroup(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdate" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginCreateOrUpdate" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps delete" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SitePatchResourceInner 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps analyzeCustomHostname" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps applySlotConfigToProduction" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps backup" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listBackups" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps discoverRestore" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getBackupStatus" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteBackup" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listBackupStatusSecrets" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps restore" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginRestore" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listConfigurations" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config") + Observable> listConfigurations(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateApplicationSettings" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listApplicationSettings" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateAuthSettings" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getAuthSettings" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") + Observable> getAuthSettings(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateBackupConfiguration" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteBackupConfiguration" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getBackupConfiguration" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateConnectionStrings" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listConnectionStrings" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getDiagnosticLogsConfiguration" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateDiagnosticLogsConfig" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateMetadata" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listMetadata" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPublishingCredentials" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginListPublishingCredentials" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateSitePushSettings" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSitePushSettings" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSlotConfigurationNames" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateSlotConfigurationNames" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getConfiguration" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateConfiguration" }) + @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 SiteConfigResourceInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateConfiguration" }) + @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 SiteConfigResourceInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listConfigurationSnapshotInfo" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots") + Observable> listConfigurationSnapshotInfo(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getConfigurationSnapshot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}") + Observable> getConfigurationSnapshot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("snapshotId") String snapshotId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps recoverSiteConfigurationSnapshot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover") + Observable> recoverSiteConfigurationSnapshot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("snapshotId") String snapshotId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getWebSiteContainerLogs" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs") + @Streaming + Observable> getWebSiteContainerLogs(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getWebSiteContainerLogsZip" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download") + @Streaming + Observable> getWebSiteContainerLogsZip(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listContinuousWebJobs" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs") + Observable> listContinuousWebJobs(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getContinuousWebJob" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") + Observable> getContinuousWebJob(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteContinuousWebJob" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", method = "DELETE", hasBody = true) + Observable> deleteContinuousWebJob(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps startContinuousWebJob" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start") + Observable> startContinuousWebJob(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps stopContinuousWebJob" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop") + Observable> stopContinuousWebJob(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listDeployments" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getDeployment" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createDeployment" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteDeployment" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listDeploymentLog" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log") + Observable> listDeploymentLog(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listDomainOwnershipIdentifiers" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers") + Observable> listDomainOwnershipIdentifiers(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getDomainOwnershipIdentifier" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + Observable> getDomainOwnershipIdentifier(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateDomainOwnershipIdentifier" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + Observable> createOrUpdateDomainOwnershipIdentifier(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, @Path("subscriptionId") String subscriptionId, @Body IdentifierInner domainOwnershipIdentifier, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteDomainOwnershipIdentifier" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", method = "DELETE", hasBody = true) + Observable> deleteDomainOwnershipIdentifier(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateDomainOwnershipIdentifier" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + Observable> updateDomainOwnershipIdentifier(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, @Path("subscriptionId") String subscriptionId, @Body IdentifierInner domainOwnershipIdentifier, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getMSDeployStatus" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") + Observable> getMSDeployStatus(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createMSDeployOperation" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") + Observable> createMSDeployOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body MSDeployInner mSDeploy, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginCreateMSDeployOperation" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") + Observable> beginCreateMSDeployOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body MSDeployInner mSDeploy, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getMSDeployLog" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log") + Observable> getMSDeployLog(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listFunctions" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions") + Observable> listFunctions(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getFunctionsAdminToken" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token") + Observable> getFunctionsAdminToken(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getFunction" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") + Observable> getFunction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createFunction" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") + Observable> createFunction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("subscriptionId") String subscriptionId, @Body FunctionEnvelopeInner functionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginCreateFunction" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") + Observable> beginCreateFunction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("subscriptionId") String subscriptionId, @Body FunctionEnvelopeInner functionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteFunction" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", method = "DELETE", hasBody = true) + Observable> deleteFunction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listFunctionSecrets" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets") + Observable> listFunctionSecrets(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listHostNameBindings" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getHostNameBinding" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateHostNameBinding" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteHostNameBinding" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getHybridConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateHybridConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteHybridConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateHybridConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listHybridConnectionKeys" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listHybridConnections" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listRelayServiceConnections" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getRelayServiceConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateRelayServiceConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteRelayServiceConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateRelayServiceConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceIdentifiers" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceMsDeployStatus" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") + Observable> getInstanceMsDeployStatus(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createInstanceMSDeployOperation" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") + Observable> createInstanceMSDeployOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body MSDeployInner mSDeploy, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginCreateInstanceMSDeployOperation" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") + Observable> beginCreateInstanceMSDeployOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body MSDeployInner mSDeploy, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceMSDeployLog" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log") + Observable> getInstanceMSDeployLog(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcesses" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes") + Observable> listInstanceProcesses(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceProcess" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") + Observable> getInstanceProcess(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteInstanceProcess" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", method = "DELETE", hasBody = true) + Observable> deleteInstanceProcess(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceProcessDump" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump") + @Streaming + Observable> getInstanceProcessDump(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcessModules" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules") + Observable> listInstanceProcessModules(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceProcessModule" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") + Observable> getInstanceProcessModule(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("baseAddress") String baseAddress, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcessThreads" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads") + Observable> listInstanceProcessThreads(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceProcessThread" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}") + Observable> getInstanceProcessThread(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("threadId") String threadId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps isCloneable" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSyncFunctionTriggers" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus") + Observable> listSyncFunctionTriggers(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listMetricDefinitions" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listMetrics" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps migrateStorage" }) + @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 migrationOptions, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginMigrateStorage" }) + @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 migrationOptions, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps migrateMySql" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginMigrateMySql" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getMigrateMySqlStatus" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status") + Observable> getMigrateMySqlStatus(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listNetworkFeatures" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps startWebSiteNetworkTrace" }) + @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("maxFrameLength") Integer maxFrameLength, @Query("sasUrl") String sasUrl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps stopWebSiteNetworkTrace" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps generateNewSitePublishingPassword" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPerfMonCounters" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getSitePhpErrorLogFlag" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPremierAddOns" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getPremierAddOn" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps addPremierAddOn" }) + @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 PremierAddOnInner premierAddOn, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deletePremierAddOn" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcesses" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes") + Observable> listProcesses(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getProcess" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") + Observable> getProcess(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteProcess" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", method = "DELETE", hasBody = true) + Observable> deleteProcess(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getProcessDump" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump") + @Streaming + Observable> getProcessDump(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcessModules" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules") + Observable> listProcessModules(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getProcessModule" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}") + Observable> getProcessModule(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("baseAddress") String baseAddress, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcessThreads" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads") + Observable> listProcessThreads(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getProcessThread" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}") + Observable> getProcessThread(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("threadId") String threadId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPublicCertificates" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates") + Observable> listPublicCertificates(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getPublicCertificate" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") + Observable> getPublicCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("publicCertificateName") String publicCertificateName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdatePublicCertificate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") + Observable> createOrUpdatePublicCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("publicCertificateName") String publicCertificateName, @Path("subscriptionId") String subscriptionId, @Body PublicCertificateInner publicCertificate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deletePublicCertificate" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", method = "DELETE", hasBody = true) + Observable> deletePublicCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("publicCertificateName") String publicCertificateName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPublishingProfileXmlWithSecrets" }) + @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 publishingProfileOptions, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps recover" }) + @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 SnapshotRecoveryRequestInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginRecover" }) + @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 SnapshotRecoveryRequestInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps resetProductionSlotConfig" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps restart" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSiteExtensions" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions") + Observable> listSiteExtensions(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getSiteExtension" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") + Observable> getSiteExtension(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("siteExtensionId") String siteExtensionId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps installSiteExtension" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") + Observable> installSiteExtension(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("siteExtensionId") String siteExtensionId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginInstallSiteExtension" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") + Observable> beginInstallSiteExtension(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("siteExtensionId") String siteExtensionId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteSiteExtension" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", method = "DELETE", hasBody = true) + Observable> deleteSiteExtension(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("siteExtensionId") String siteExtensionId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSlots" }) + @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("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getSlot" }) + @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("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginCreateOrUpdateSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateSlot" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") + Observable> updateSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SitePatchResourceInner 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps analyzeCustomHostnameSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps applySlotConfigurationSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps backupSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listBackupsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps discoverRestoreSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getBackupStatusSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteBackupSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listBackupStatusSecretsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps restoreSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginRestoreSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listConfigurationsSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config") + Observable> listConfigurationsSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateApplicationSettingsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listApplicationSettingsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateAuthSettingsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getAuthSettingsSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") + Observable> getAuthSettingsSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateBackupConfigurationSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteBackupConfigurationSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getBackupConfigurationSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateConnectionStringsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listConnectionStringsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getDiagnosticLogsConfigurationSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateDiagnosticLogsConfigSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateMetadataSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listMetadataSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPublishingCredentialsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginListPublishingCredentialsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateSitePushSettingsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSitePushSettingsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getConfigurationSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateConfigurationSlot" }) + @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 SiteConfigResourceInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateConfigurationSlot" }) + @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 SiteConfigResourceInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listConfigurationSnapshotInfoSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots") + Observable> listConfigurationSnapshotInfoSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getConfigurationSnapshotSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}") + Observable> getConfigurationSnapshotSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("snapshotId") String snapshotId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps recoverSiteConfigurationSnapshotSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover") + Observable> recoverSiteConfigurationSnapshotSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("snapshotId") String snapshotId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getWebSiteContainerLogsSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs") + @Streaming + Observable> getWebSiteContainerLogsSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getWebSiteContainerLogsZipSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download") + @Streaming + Observable> getWebSiteContainerLogsZipSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listContinuousWebJobsSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs") + Observable> listContinuousWebJobsSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getContinuousWebJobSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") + Observable> getContinuousWebJobSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteContinuousWebJobSlot" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", method = "DELETE", hasBody = true) + Observable> deleteContinuousWebJobSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps startContinuousWebJobSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start") + Observable> startContinuousWebJobSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps stopContinuousWebJobSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop") + Observable> stopContinuousWebJobSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listDeploymentsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getDeploymentSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createDeploymentSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteDeploymentSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listDeploymentLogSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log") + Observable> listDeploymentLogSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listDomainOwnershipIdentifiersSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers") + Observable> listDomainOwnershipIdentifiersSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getDomainOwnershipIdentifierSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + Observable> getDomainOwnershipIdentifierSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateDomainOwnershipIdentifierSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + Observable> createOrUpdateDomainOwnershipIdentifierSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body IdentifierInner domainOwnershipIdentifier, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteDomainOwnershipIdentifierSlot" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", method = "DELETE", hasBody = true) + Observable> deleteDomainOwnershipIdentifierSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateDomainOwnershipIdentifierSlot" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + Observable> updateDomainOwnershipIdentifierSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body IdentifierInner domainOwnershipIdentifier, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getMSDeployStatusSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") + Observable> getMSDeployStatusSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createMSDeployOperationSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") + Observable> createMSDeployOperationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body MSDeployInner mSDeploy, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginCreateMSDeployOperationSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") + Observable> beginCreateMSDeployOperationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body MSDeployInner mSDeploy, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getMSDeployLogSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log") + Observable> getMSDeployLogSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceFunctionsSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions") + Observable> listInstanceFunctionsSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getFunctionsAdminTokenSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token") + Observable> getFunctionsAdminTokenSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceFunctionSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") + Observable> getInstanceFunctionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createInstanceFunctionSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") + Observable> createInstanceFunctionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body FunctionEnvelopeInner functionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginCreateInstanceFunctionSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") + Observable> beginCreateInstanceFunctionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body FunctionEnvelopeInner functionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteInstanceFunctionSlot" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", method = "DELETE", hasBody = true) + Observable> deleteInstanceFunctionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listFunctionSecretsSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets") + Observable> listFunctionSecretsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listHostNameBindingsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getHostNameBindingSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateHostNameBindingSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteHostNameBindingSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getHybridConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateHybridConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteHybridConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateHybridConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listHybridConnectionKeysSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listHybridConnectionsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listRelayServiceConnectionsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getRelayServiceConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateRelayServiceConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteRelayServiceConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateRelayServiceConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceIdentifiersSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceMsDeployStatusSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") + Observable> getInstanceMsDeployStatusSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createInstanceMSDeployOperationSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") + Observable> createInstanceMSDeployOperationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body MSDeployInner mSDeploy, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginCreateInstanceMSDeployOperationSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") + Observable> beginCreateInstanceMSDeployOperationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body MSDeployInner mSDeploy, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceMSDeployLogSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") + Observable> getInstanceMSDeployLogSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcessesSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes") + Observable> listInstanceProcessesSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceProcessSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") + Observable> getInstanceProcessSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteInstanceProcessSlot" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", method = "DELETE", hasBody = true) + Observable> deleteInstanceProcessSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceProcessDumpSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") + @Streaming + Observable> getInstanceProcessDumpSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcessModulesSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") + Observable> listInstanceProcessModulesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceProcessModuleSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") + Observable> getInstanceProcessModuleSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("baseAddress") String baseAddress, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcessThreadsSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") + Observable> listInstanceProcessThreadsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getInstanceProcessThreadSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}") + Observable> getInstanceProcessThreadSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("threadId") String threadId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps isCloneableSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSyncFunctionTriggersSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus") + Observable> listSyncFunctionTriggersSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listMetricDefinitionsSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listMetricsSlot" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getMigrateMySqlStatusSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status") + Observable> getMigrateMySqlStatusSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listNetworkFeaturesSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps startWebSiteNetworkTraceSlot" }) + @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("maxFrameLength") Integer maxFrameLength, @Query("sasUrl") String sasUrl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps stopWebSiteNetworkTraceSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps generateNewSitePublishingPasswordSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPerfMonCountersSlot" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getSitePhpErrorLogFlagSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPremierAddOnsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getPremierAddOnSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps addPremierAddOnSlot" }) + @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 PremierAddOnInner premierAddOn, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deletePremierAddOnSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcessesSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes") + Observable> listProcessesSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getProcessSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") + Observable> getProcessSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteProcessSlot" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", method = "DELETE", hasBody = true) + Observable> deleteProcessSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getProcessDumpSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump") + @Streaming + Observable> getProcessDumpSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcessModulesSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules") + Observable> listProcessModulesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getProcessModuleSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}") + Observable> getProcessModuleSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("baseAddress") String baseAddress, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcessThreadsSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads") + Observable> listProcessThreadsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getProcessThreadSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}") + Observable> getProcessThreadSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("processId") String processId, @Path("threadId") String threadId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPublicCertificatesSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates") + Observable> listPublicCertificatesSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getPublicCertificateSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") + Observable> getPublicCertificateSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("publicCertificateName") String publicCertificateName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdatePublicCertificateSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") + Observable> createOrUpdatePublicCertificateSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("publicCertificateName") String publicCertificateName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body PublicCertificateInner publicCertificate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deletePublicCertificateSlot" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", method = "DELETE", hasBody = true) + Observable> deletePublicCertificateSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("publicCertificateName") String publicCertificateName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPublishingProfileXmlWithSecretsSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml") + @Streaming + 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 publishingProfileOptions, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps recoverSlot" }) + @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 SnapshotRecoveryRequestInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginRecoverSlot" }) + @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 SnapshotRecoveryRequestInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps resetSlotConfigurationSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps restartSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSiteExtensionsSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions") + Observable> listSiteExtensionsSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getSiteExtensionSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") + Observable> getSiteExtensionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("siteExtensionId") String siteExtensionId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps installSiteExtensionSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") + Observable> installSiteExtensionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("siteExtensionId") String siteExtensionId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginInstallSiteExtensionSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") + Observable> beginInstallSiteExtensionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("siteExtensionId") String siteExtensionId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteSiteExtensionSlot" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", method = "DELETE", hasBody = true) + Observable> deleteSiteExtensionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("siteExtensionId") String siteExtensionId, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSlotDifferencesSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") + Observable> listSlotDifferencesSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps swapSlotSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") + Observable> swapSlotSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginSwapSlotSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") + Observable> beginSwapSlotSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSnapshotsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getSourceControlSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateSourceControlSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginCreateOrUpdateSourceControlSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") + Observable> beginCreateOrUpdateSourceControlSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteSourceControlSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateSourceControlSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps startSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps stopSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps syncRepositorySlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps syncFunctionTriggersSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers") + Observable> syncFunctionTriggersSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listTriggeredWebJobsSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs") + Observable> listTriggeredWebJobsSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getTriggeredWebJobSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") + Observable> getTriggeredWebJobSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteTriggeredWebJobSlot" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", method = "DELETE", hasBody = true) + Observable> deleteTriggeredWebJobSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listTriggeredWebJobHistorySlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history") + Observable> listTriggeredWebJobHistorySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getTriggeredWebJobHistorySlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") + Observable> getTriggeredWebJobHistorySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps runTriggeredWebJobSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run") + Observable> runTriggeredWebJobSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listUsagesSlot" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listVnetConnectionsSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getVnetConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateVnetConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteVnetConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateVnetConnectionSlot" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getVnetConnectionGatewaySlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateVnetConnectionGatewaySlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateVnetConnectionGatewaySlot" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listWebJobsSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs") + Observable> listWebJobsSlot(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getWebJobSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}") + Observable> getWebJobSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSlotDifferencesFromProduction" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") + Observable> listSlotDifferencesFromProduction(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps swapSlotWithProduction" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginSwapSlotWithProduction" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSnapshots" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getSourceControl" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateSourceControl" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps beginCreateOrUpdateSourceControl" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") + Observable> beginCreateOrUpdateSourceControl(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteSourceControl" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateSourceControl" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps start" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps stop" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps syncRepository" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps syncFunctionTriggers" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers") + Observable> syncFunctionTriggers(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listTriggeredWebJobs" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs") + Observable> listTriggeredWebJobs(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getTriggeredWebJob" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") + Observable> getTriggeredWebJob(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteTriggeredWebJob" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", method = "DELETE", hasBody = true) + Observable> deleteTriggeredWebJob(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listTriggeredWebJobHistory" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history") + Observable> listTriggeredWebJobHistory(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getTriggeredWebJobHistory" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}") + Observable> getTriggeredWebJobHistory(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps runTriggeredWebJob" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run") + Observable> runTriggeredWebJob(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listUsages" }) + @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(value = "$filter", encoded = true) 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listVnetConnections" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getVnetConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateVnetConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps deleteVnetConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateVnetConnection" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getVnetConnectionGateway" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps createOrUpdateVnetConnectionGateway" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps updateVnetConnectionGateway" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + 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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listWebJobs" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs") + Observable> listWebJobs(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps getWebJob" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}") + Observable> getWebJob(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("webJobName") String webJobName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listBackupsNext" }) + @GET + Observable> listBackupsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listConfigurationsNext" }) + @GET + Observable> listConfigurationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listConfigurationSnapshotInfoNext" }) + @GET + Observable> listConfigurationSnapshotInfoNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listContinuousWebJobsNext" }) + @GET + Observable> listContinuousWebJobsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listDeploymentsNext" }) + @GET + Observable> listDeploymentsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listDomainOwnershipIdentifiersNext" }) + @GET + Observable> listDomainOwnershipIdentifiersNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listFunctionsNext" }) + @GET + Observable> listFunctionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listHostNameBindingsNext" }) + @GET + Observable> listHostNameBindingsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceIdentifiersNext" }) + @GET + Observable> listInstanceIdentifiersNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcessesNext" }) + @GET + Observable> listInstanceProcessesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcessModulesNext" }) + @GET + Observable> listInstanceProcessModulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcessThreadsNext" }) + @GET + Observable> listInstanceProcessThreadsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listMetricDefinitionsNext" }) + @GET + Observable> listMetricDefinitionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listMetricsNext" }) + @GET + Observable> listMetricsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPerfMonCountersNext" }) + @GET + Observable> listPerfMonCountersNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcessesNext" }) + @GET + Observable> listProcessesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcessModulesNext" }) + @GET + Observable> listProcessModulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcessThreadsNext" }) + @GET + Observable> listProcessThreadsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPublicCertificatesNext" }) + @GET + Observable> listPublicCertificatesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSiteExtensionsNext" }) + @GET + Observable> listSiteExtensionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSlotsNext" }) + @GET + Observable> listSlotsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listBackupsSlotNext" }) + @GET + Observable> listBackupsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listConfigurationsSlotNext" }) + @GET + Observable> listConfigurationsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listConfigurationSnapshotInfoSlotNext" }) + @GET + Observable> listConfigurationSnapshotInfoSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listContinuousWebJobsSlotNext" }) + @GET + Observable> listContinuousWebJobsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listDeploymentsSlotNext" }) + @GET + Observable> listDeploymentsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listDomainOwnershipIdentifiersSlotNext" }) + @GET + Observable> listDomainOwnershipIdentifiersSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceFunctionsSlotNext" }) + @GET + Observable> listInstanceFunctionsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listHostNameBindingsSlotNext" }) + @GET + Observable> listHostNameBindingsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceIdentifiersSlotNext" }) + @GET + Observable> listInstanceIdentifiersSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcessesSlotNext" }) + @GET + Observable> listInstanceProcessesSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcessModulesSlotNext" }) + @GET + Observable> listInstanceProcessModulesSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listInstanceProcessThreadsSlotNext" }) + @GET + Observable> listInstanceProcessThreadsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listMetricDefinitionsSlotNext" }) + @GET + Observable> listMetricDefinitionsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listMetricsSlotNext" }) + @GET + Observable> listMetricsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPerfMonCountersSlotNext" }) + @GET + Observable> listPerfMonCountersSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcessesSlotNext" }) + @GET + Observable> listProcessesSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcessModulesSlotNext" }) + @GET + Observable> listProcessModulesSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listProcessThreadsSlotNext" }) + @GET + Observable> listProcessThreadsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listPublicCertificatesSlotNext" }) + @GET + Observable> listPublicCertificatesSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSiteExtensionsSlotNext" }) + @GET + Observable> listSiteExtensionsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSlotDifferencesSlotNext" }) + @GET + Observable> listSlotDifferencesSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSnapshotsSlotNext" }) + @GET + Observable> listSnapshotsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listTriggeredWebJobsSlotNext" }) + @GET + Observable> listTriggeredWebJobsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listTriggeredWebJobHistorySlotNext" }) + @GET + Observable> listTriggeredWebJobHistorySlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listUsagesSlotNext" }) + @GET + Observable> listUsagesSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listWebJobsSlotNext" }) + @GET + Observable> listWebJobsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSlotDifferencesFromProductionNext" }) + @GET + Observable> listSlotDifferencesFromProductionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listSnapshotsNext" }) + @GET + Observable> listSnapshotsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listTriggeredWebJobsNext" }) + @GET + Observable> listTriggeredWebJobsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listTriggeredWebJobHistoryNext" }) + @GET + Observable> listTriggeredWebJobHistoryNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listUsagesNext" }) + @GET + Observable> listUsagesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebApps listWebJobsNext" }) + @GET + Observable> listWebJobsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all apps for a subscription. + * Get all apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all apps for a subscription. + * Get all apps for a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all apps for a subscription. + * Get all apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all apps for a subscription. + * Get all apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all apps for a subscription. + * Get all apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + 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) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> 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-08-01"; + final Boolean includeSlots = null; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), includeSlots, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default is false, which only gives you the production slot of all apps. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final Boolean includeSlots) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, includeSlots).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default is false, which only gives you the production slot of all apps. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final Boolean includeSlots, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, includeSlots), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default is false, which only gives you the production slot of all apps. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final Boolean includeSlots) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, includeSlots) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default is false, which only gives you the production slot of all apps. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final Boolean includeSlots) { + return listByResourceGroupSinglePageAsync(resourceGroupName, includeSlots) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default is false, which only gives you the production slot of all apps. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final Boolean includeSlots) { + 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-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), includeSlots, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of a web, mobile, or API app. + * Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + public SiteInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the details of a web, mobile, or API app. + * Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the details of a web, mobile, or API app. + * Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteInner>() { + @Override + public SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a web, mobile, or API app. + * Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(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.getByResourceGroup(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 = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + public SiteInner createOrUpdate(String resourceGroupName, String name, SiteInner siteEnvelope) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).toBlocking().last().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).map(new Func1, SiteInner>() { + @Override + public SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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 (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."); + } + 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()); + } + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + 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().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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 SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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 (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."); + } + 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()); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + public SiteInner beginCreateOrUpdate(String resourceGroupName, String name, SiteInner siteEnvelope) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).map(new Func1, SiteInner>() { + @Override + public SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + 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().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner 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 SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String name) { + deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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-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 = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify true if the App Service plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not deleted. + * @param skipDnsRegistration If true, DNS registration is skipped. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration) { + deleteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration).toBlocking().single().body(); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify true if the App Service plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not deleted. + * @param skipDnsRegistration If true, DNS registration is skipped. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration), serviceCallback); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify true if the App Service plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not deleted. + * @param skipDnsRegistration If true, DNS registration is skipped. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration) { + return deleteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify true if the App Service plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not deleted. + * @param skipDnsRegistration If true, DNS registration is skipped. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + 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.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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + public SiteInner update(String resourceGroupName, String name, SitePatchResourceInner siteEnvelope) { + return updateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String name, SitePatchResourceInner siteEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable updateAsync(String resourceGroupName, String name, SitePatchResourceInner siteEnvelope) { + return updateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).map(new Func1, SiteInner>() { + @Override + public SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, SitePatchResourceInner 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 (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."); + } + 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.update(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) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + public SiteInner update(String resourceGroupName, String name, SitePatchResourceInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return updateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().single().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String name, SitePatchResourceInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable updateAsync(String resourceGroupName, String name, SitePatchResourceInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return updateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).map(new Func1, SiteInner>() { + @Override + public SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, SitePatchResourceInner 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 (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."); + } + Validator.validate(siteEnvelope); + final String apiVersion = "2016-08-01"; + return service.update(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) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CustomHostnameAnalysisResultInner object if successful. + */ + public CustomHostnameAnalysisResultInner analyzeCustomHostname(String resourceGroupName, String name) { + return analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture analyzeCustomHostnameAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CustomHostnameAnalysisResultInner object + */ + public Observable analyzeCustomHostnameAsync(String resourceGroupName, String name) { + return analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name).map(new Func1, CustomHostnameAnalysisResultInner>() { + @Override + public CustomHostnameAnalysisResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CustomHostnameAnalysisResultInner object + */ + public Observable> analyzeCustomHostnameWithServiceResponseAsync(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"; + 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) { + try { + ServiceResponse clientResponse = analyzeCustomHostnameDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param hostName Custom hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CustomHostnameAnalysisResultInner object if successful. + */ + public CustomHostnameAnalysisResultInner analyzeCustomHostname(String resourceGroupName, String name, String hostName) { + return analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name, hostName).toBlocking().single().body(); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param hostName Custom hostname. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture analyzeCustomHostnameAsync(String resourceGroupName, String name, String hostName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name, hostName), serviceCallback); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param hostName Custom hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CustomHostnameAnalysisResultInner object + */ + public Observable analyzeCustomHostnameAsync(String resourceGroupName, String name, String hostName) { + return analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name, hostName).map(new Func1, CustomHostnameAnalysisResultInner>() { + @Override + public CustomHostnameAnalysisResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param hostName Custom hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CustomHostnameAnalysisResultInner object + */ + 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 (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.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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void applySlotConfigToProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single().body(); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture applySlotConfigToProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable applySlotConfigToProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + return applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 (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.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 = applySlotConfigToProductionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse applySlotConfigToProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a backup of an app. + * Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BackupItemInner object if successful. + */ + public BackupItemInner backup(String resourceGroupName, String name, BackupRequestInner request) { + return backupWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().body(); + } + + /** + * Creates a backup of an app. + * Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture backupAsync(String resourceGroupName, String name, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(backupWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); + } + + /** + * Creates a backup of an app. + * Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + 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.body(); + } + }); + } + + /** + * Creates a backup of an app. + * Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + public Observable> backupWithServiceResponseAsync(String resourceGroupName, String name, 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = backupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse backupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BackupItemInner> object if successful. + */ + public PagedList listBackups(final String resourceGroupName, final String name) { + ServiceResponse> response = listBackupsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBackupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBackupsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBackupsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBackupsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BackupItemInner> object + */ + public Observable> listBackupsAsync(final String resourceGroupName, final String name) { + return listBackupsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BackupItemInner> object + */ + public Observable>> listBackupsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listBackupsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBackupsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BackupItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.listBackups(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 = listBackupsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBackupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RestoreRequestInner object if successful. + */ + public RestoreRequestInner discoverRestore(String resourceGroupName, String name, RestoreRequestInner request) { + return discoverRestoreWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().body(); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture discoverRestoreAsync(String resourceGroupName, String name, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(discoverRestoreWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RestoreRequestInner object + */ + public Observable discoverRestoreAsync(String resourceGroupName, String name, RestoreRequestInner request) { + return discoverRestoreWithServiceResponseAsync(resourceGroupName, name, request).map(new Func1, RestoreRequestInner>() { + @Override + public RestoreRequestInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RestoreRequestInner object + */ + public Observable> discoverRestoreWithServiceResponseAsync(String resourceGroupName, String name, 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = discoverRestoreDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse discoverRestoreDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a backup of an app by its ID. + * Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BackupItemInner object if successful. + */ + public BackupItemInner getBackupStatus(String resourceGroupName, String name, String backupId) { + return getBackupStatusWithServiceResponseAsync(resourceGroupName, name, backupId).toBlocking().single().body(); + } + + /** + * Gets a backup of an app by its ID. + * Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getBackupStatusAsync(String resourceGroupName, String name, String backupId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getBackupStatusWithServiceResponseAsync(resourceGroupName, name, backupId), serviceCallback); + } + + /** + * Gets a backup of an app by its ID. + * Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + public Observable getBackupStatusAsync(String resourceGroupName, String name, String backupId) { + return getBackupStatusWithServiceResponseAsync(resourceGroupName, name, backupId).map(new Func1, BackupItemInner>() { + @Override + public BackupItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a backup of an app by its ID. + * Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = getBackupStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getBackupStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a backup of an app by its ID. + * Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteBackup(String resourceGroupName, String name, String backupId) { + deleteBackupWithServiceResponseAsync(resourceGroupName, name, backupId).toBlocking().single().body(); + } + + /** + * Deletes a backup of an app by its ID. + * Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteBackupAsync(String resourceGroupName, String name, String backupId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteBackupWithServiceResponseAsync(resourceGroupName, name, backupId), serviceCallback); + } + + /** + * Deletes a backup of an app by its ID. + * Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteBackupAsync(String resourceGroupName, String name, String backupId) { + return deleteBackupWithServiceResponseAsync(resourceGroupName, name, backupId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a backup of an app by its ID. + * Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = deleteBackupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteBackupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, 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. + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BackupItemInner object if successful. + */ + public BackupItemInner listBackupStatusSecrets(String resourceGroupName, String name, String backupId, BackupRequestInner request) { + return listBackupStatusSecretsWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().single().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. + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listBackupStatusSecretsWithServiceResponseAsync(resourceGroupName, name, backupId, request), 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. + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + public Observable listBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequestInner request) { + return listBackupStatusSecretsWithServiceResponseAsync(resourceGroupName, name, backupId, request).map(new Func1, BackupItemInner>() { + @Override + public BackupItemInner call(ServiceResponse response) { + return response.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. + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + 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 (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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = listBackupStatusSecretsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listBackupStatusSecretsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RestoreResponseInner object if successful. + */ + public RestoreResponseInner restore(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return restoreWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().last().body(); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture restoreAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restoreWithServiceResponseAsync(resourceGroupName, name, backupId, request), serviceCallback); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable restoreAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return restoreWithServiceResponseAsync(resourceGroupName, name, backupId, request).map(new Func1, RestoreResponseInner>() { + @Override + public RestoreResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + 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()); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RestoreResponseInner object if successful. + */ + public RestoreResponseInner beginRestore(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return beginRestoreWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().single().body(); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRestoreAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestoreWithServiceResponseAsync(resourceGroupName, name, backupId, request), serviceCallback); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RestoreResponseInner object + */ + public Observable beginRestoreAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return beginRestoreWithServiceResponseAsync(resourceGroupName, name, backupId, request).map(new Func1, RestoreResponseInner>() { + @Override + public RestoreResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RestoreResponseInner object + */ + 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = beginRestoreDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestoreDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteConfigResourceInner> object if successful. + */ + public PagedList listConfigurations(final String resourceGroupName, final String name) { + ServiceResponse> response = listConfigurationsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listConfigurationsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listConfigurationsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listConfigurationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigResourceInner> object + */ + public Observable> listConfigurationsAsync(final String resourceGroupName, final String name) { + return listConfigurationsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigResourceInner> object + */ + public Observable>> listConfigurationsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listConfigurationsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listConfigurationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteConfigResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listConfigurationsSinglePageAsync(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.listConfigurations(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 = listConfigurationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Replaces the application settings of an app. + * Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StringDictionaryInner object if successful. + */ + public StringDictionaryInner updateApplicationSettings(String resourceGroupName, String name, StringDictionaryInner appSettings) { + return updateApplicationSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings).toBlocking().single().body(); + } + + /** + * Replaces the application settings of an app. + * Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateApplicationSettingsAsync(String resourceGroupName, String name, StringDictionaryInner appSettings, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateApplicationSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings), serviceCallback); + } + + /** + * Replaces the application settings of an app. + * Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + 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.body(); + } + }); + } + + /** + * Replaces the application settings of an app. + * Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable> updateApplicationSettingsWithServiceResponseAsync(String resourceGroupName, String name, 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = updateApplicationSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateApplicationSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the application settings of an app. + * Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StringDictionaryInner object if successful. + */ + public StringDictionaryInner listApplicationSettings(String resourceGroupName, String name) { + return listApplicationSettingsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the application settings of an app. + * Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listApplicationSettingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listApplicationSettingsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the application settings of an app. + * Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable listApplicationSettingsAsync(String resourceGroupName, String name) { + return listApplicationSettingsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the application settings of an app. + * Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable> listApplicationSettingsWithServiceResponseAsync(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.listApplicationSettings(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 = listApplicationSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listApplicationSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteAuthSettingsInner object if successful. + */ + public SiteAuthSettingsInner updateAuthSettings(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { + return updateAuthSettingsWithServiceResponseAsync(resourceGroupName, name, siteAuthSettings).toBlocking().single().body(); + } + + /** + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAuthSettingsAsync(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateAuthSettingsWithServiceResponseAsync(resourceGroupName, name, siteAuthSettings), serviceCallback); + } + + /** + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteAuthSettingsInner object + */ + 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.body(); + } + }); + } + + /** + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteAuthSettingsInner object + */ + 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 (siteAuthSettings == null) { + throw new IllegalArgumentException("Parameter siteAuthSettings is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = updateAuthSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateAuthSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the Authentication/Authorization settings of an app. + * Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteAuthSettingsInner object if successful. + */ + public SiteAuthSettingsInner getAuthSettings(String resourceGroupName, String name) { + return getAuthSettingsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the Authentication/Authorization settings of an app. + * Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAuthSettingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAuthSettingsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the Authentication/Authorization settings of an app. + * Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteAuthSettingsInner object + */ + public Observable getAuthSettingsAsync(String resourceGroupName, String name) { + return getAuthSettingsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteAuthSettingsInner>() { + @Override + public SiteAuthSettingsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Authentication/Authorization settings of an app. + * Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteAuthSettingsInner object + */ + public Observable> getAuthSettingsWithServiceResponseAsync(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.getAuthSettings(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 = getAuthSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAuthSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the backup configuration of an app. + * Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BackupRequestInner object if successful. + */ + public BackupRequestInner updateBackupConfiguration(String resourceGroupName, String name, BackupRequestInner request) { + return updateBackupConfigurationWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().body(); + } + + /** + * Updates the backup configuration of an app. + * Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateBackupConfigurationAsync(String resourceGroupName, String name, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateBackupConfigurationWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); + } + + /** + * Updates the backup configuration of an app. + * Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupRequestInner object + */ + public Observable updateBackupConfigurationAsync(String resourceGroupName, String name, BackupRequestInner request) { + return updateBackupConfigurationWithServiceResponseAsync(resourceGroupName, name, request).map(new Func1, BackupRequestInner>() { + @Override + public BackupRequestInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the backup configuration of an app. + * Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupRequestInner object + */ + public Observable> updateBackupConfigurationWithServiceResponseAsync(String resourceGroupName, String name, 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = updateBackupConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateBackupConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the backup configuration of an app. + * Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteBackupConfiguration(String resourceGroupName, String name) { + deleteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Deletes the backup configuration of an app. + * Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteBackupConfigurationAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Deletes the backup configuration of an app. + * Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteBackupConfigurationAsync(String resourceGroupName, String name) { + return deleteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the backup configuration of an app. + * Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteBackupConfigurationWithServiceResponseAsync(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.deleteBackupConfiguration(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 = deleteBackupConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteBackupConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the backup configuration of an app. + * Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BackupRequestInner object if successful. + */ + public BackupRequestInner getBackupConfiguration(String resourceGroupName, String name) { + return getBackupConfigurationWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the backup configuration of an app. + * Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getBackupConfigurationAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getBackupConfigurationWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the backup configuration of an app. + * Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupRequestInner object + */ + public Observable getBackupConfigurationAsync(String resourceGroupName, String name) { + return getBackupConfigurationWithServiceResponseAsync(resourceGroupName, name).map(new Func1, BackupRequestInner>() { + @Override + public BackupRequestInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the backup configuration of an app. + * Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupRequestInner object + */ + public Observable> getBackupConfigurationWithServiceResponseAsync(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.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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Replaces the connection strings of an app. + * Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionStringDictionaryInner object if successful. + */ + public ConnectionStringDictionaryInner updateConnectionStrings(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsWithServiceResponseAsync(resourceGroupName, name, connectionStrings).toBlocking().single().body(); + } + + /** + * Replaces the connection strings of an app. + * Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateConnectionStringsAsync(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateConnectionStringsWithServiceResponseAsync(resourceGroupName, name, connectionStrings), serviceCallback); + } + + /** + * Replaces the connection strings of an app. + * Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionStringDictionaryInner object + */ + public Observable updateConnectionStringsAsync(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsWithServiceResponseAsync(resourceGroupName, name, connectionStrings).map(new Func1, ConnectionStringDictionaryInner>() { + @Override + public ConnectionStringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Replaces the connection strings of an app. + * Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionStringDictionaryInner object + */ + public Observable> updateConnectionStringsWithServiceResponseAsync(String resourceGroupName, String name, 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 (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."); + } + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the connection strings of an app. + * Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionStringDictionaryInner object if successful. + */ + public ConnectionStringDictionaryInner listConnectionStrings(String resourceGroupName, String name) { + return listConnectionStringsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the connection strings of an app. + * Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listConnectionStringsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listConnectionStringsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the connection strings of an app. + * Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionStringDictionaryInner object + */ + public Observable listConnectionStringsAsync(String resourceGroupName, String name) { + return listConnectionStringsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, ConnectionStringDictionaryInner>() { + @Override + public ConnectionStringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the connection strings of an app. + * Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionStringDictionaryInner object + */ + public Observable> listConnectionStringsWithServiceResponseAsync(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.listConnectionStrings(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 = listConnectionStringsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listConnectionStringsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the logging configuration of an app. + * Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteLogsConfigInner object if successful. + */ + public SiteLogsConfigInner getDiagnosticLogsConfiguration(String resourceGroupName, String name) { + return getDiagnosticLogsConfigurationWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the logging configuration of an app. + * Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getDiagnosticLogsConfigurationAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDiagnosticLogsConfigurationWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the logging configuration of an app. + * Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteLogsConfigInner object + */ + public Observable getDiagnosticLogsConfigurationAsync(String resourceGroupName, String name) { + return getDiagnosticLogsConfigurationWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteLogsConfigInner>() { + @Override + public SiteLogsConfigInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the logging configuration of an app. + * Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteLogsConfigInner object + */ + public Observable> getDiagnosticLogsConfigurationWithServiceResponseAsync(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.getDiagnosticLogsConfiguration(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 = getDiagnosticLogsConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDiagnosticLogsConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the logging configuration of an app. + * Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteLogsConfigInner object if successful. + */ + public SiteLogsConfigInner updateDiagnosticLogsConfig(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigWithServiceResponseAsync(resourceGroupName, name, siteLogsConfig).toBlocking().single().body(); + } + + /** + * Updates the logging configuration of an app. + * Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateDiagnosticLogsConfigAsync(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateDiagnosticLogsConfigWithServiceResponseAsync(resourceGroupName, name, siteLogsConfig), serviceCallback); + } + + /** + * Updates the logging configuration of an app. + * Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteLogsConfigInner object + */ + public Observable updateDiagnosticLogsConfigAsync(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigWithServiceResponseAsync(resourceGroupName, name, siteLogsConfig).map(new Func1, SiteLogsConfigInner>() { + @Override + public SiteLogsConfigInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the logging configuration of an app. + * Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + 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 (siteLogsConfig == null) { + throw new IllegalArgumentException("Parameter siteLogsConfig is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = updateDiagnosticLogsConfigDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDiagnosticLogsConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Replaces the metadata of an app. + * Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StringDictionaryInner object if successful. + */ + public StringDictionaryInner updateMetadata(String resourceGroupName, String name, StringDictionaryInner metadata) { + return updateMetadataWithServiceResponseAsync(resourceGroupName, name, metadata).toBlocking().single().body(); + } + + /** + * Replaces the metadata of an app. + * Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateMetadataAsync(String resourceGroupName, String name, StringDictionaryInner metadata, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateMetadataWithServiceResponseAsync(resourceGroupName, name, metadata), serviceCallback); + } + + /** + * Replaces the metadata of an app. + * Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable updateMetadataAsync(String resourceGroupName, String name, StringDictionaryInner metadata) { + return updateMetadataWithServiceResponseAsync(resourceGroupName, name, metadata).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Replaces the metadata of an app. + * Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable> updateMetadataWithServiceResponseAsync(String resourceGroupName, String name, StringDictionaryInner metadata) { + if (resourceGroupName == null) { + throw new 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 (metadata == null) { + throw new IllegalArgumentException("Parameter metadata is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = updateMetadataDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the metadata of an app. + * Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StringDictionaryInner object if successful. + */ + public StringDictionaryInner listMetadata(String resourceGroupName, String name) { + return listMetadataWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the metadata of an app. + * Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listMetadataAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listMetadataWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the metadata of an app. + * Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable listMetadataAsync(String resourceGroupName, String name) { + return listMetadataWithServiceResponseAsync(resourceGroupName, name).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the metadata of an app. + * Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + 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 (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.listMetadata(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 = listMetadataDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the UserInner object if successful. + */ + public UserInner listPublishingCredentials(String resourceGroupName, String name) { + return listPublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().body(); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listPublishingCredentialsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listPublishingCredentialsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listPublishingCredentialsAsync(String resourceGroupName, String name) { + return listPublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, UserInner>() { + @Override + public UserInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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 Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the UserInner object if successful. + */ + public UserInner beginListPublishingCredentials(String resourceGroupName, String name) { + return beginListPublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginListPublishingCredentialsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListPublishingCredentialsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + 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) { + try { + ServiceResponse clientResponse = beginListPublishingCredentialsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListPublishingCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PushSettingsInner object if successful. + */ + public PushSettingsInner updateSitePushSettings(String resourceGroupName, String name, PushSettingsInner pushSettings) { + return updateSitePushSettingsWithServiceResponseAsync(resourceGroupName, name, pushSettings).toBlocking().single().body(); + } + + /** + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateSitePushSettingsAsync(String resourceGroupName, String name, PushSettingsInner pushSettings, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSitePushSettingsWithServiceResponseAsync(resourceGroupName, name, pushSettings), serviceCallback); + } + + /** + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PushSettingsInner object + */ + public Observable updateSitePushSettingsAsync(String resourceGroupName, String name, PushSettingsInner pushSettings) { + return updateSitePushSettingsWithServiceResponseAsync(resourceGroupName, name, pushSettings).map(new Func1, PushSettingsInner>() { + @Override + public PushSettingsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PushSettingsInner object + */ + 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (pushSettings == null) { + throw new IllegalArgumentException("Parameter pushSettings is required and cannot be null."); + } + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PushSettingsInner object if successful. + */ + public PushSettingsInner listSitePushSettings(String resourceGroupName, String name) { + return listSitePushSettingsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listSitePushSettingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listSitePushSettingsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PushSettingsInner object + */ + public Observable listSitePushSettingsAsync(String resourceGroupName, String name) { + return listSitePushSettingsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, PushSettingsInner>() { + @Override + public PushSettingsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PushSettingsInner object + */ + 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 (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.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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the names of app settings and connection strings that stick to the slot (not swapped). + * Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SlotConfigNamesResourceInner object if successful. + */ + public SlotConfigNamesResourceInner listSlotConfigurationNames(String resourceGroupName, String name) { + return listSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the names of app settings and connection strings that stick to the slot (not swapped). + * Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listSlotConfigurationNamesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the names of app settings and connection strings that stick to the slot (not swapped). + * Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SlotConfigNamesResourceInner object + */ + public Observable listSlotConfigurationNamesAsync(String resourceGroupName, String name) { + return listSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SlotConfigNamesResourceInner>() { + @Override + public SlotConfigNamesResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the names of app settings and connection strings that stick to the slot (not swapped). + * Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SlotConfigNamesResourceInner object + */ + 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 (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.listSlotConfigurationNames(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 = listSlotConfigurationNamesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSlotConfigurationNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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 to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SlotConfigNamesResourceInner object if successful. + */ + public SlotConfigNamesResourceInner updateSlotConfigurationNames(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { + return updateSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name, slotConfigNames).toBlocking().single().body(); + } + + /** + * 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 to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateSlotConfigurationNamesAsync(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name, slotConfigNames), serviceCallback); + } + + /** + * 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 to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SlotConfigNamesResourceInner object + */ + public Observable updateSlotConfigurationNamesAsync(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { + return updateSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name, slotConfigNames).map(new Func1, SlotConfigNamesResourceInner>() { + @Override + public SlotConfigNamesResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SlotConfigNamesResourceInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = updateSlotConfigurationNamesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateSlotConfigurationNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteConfigResourceInner object if successful. + */ + public SiteConfigResourceInner getConfiguration(String resourceGroupName, String name) { + return getConfigurationWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getConfigurationAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getConfigurationWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable getConfigurationAsync(String resourceGroupName, String name) { + return getConfigurationWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteConfigResourceInner>() { + @Override + public SiteConfigResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + 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 (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.getConfiguration(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 = getConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteConfigResourceInner object if successful. + */ + public SiteConfigResourceInner createOrUpdateConfiguration(String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + return createOrUpdateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig).toBlocking().single().body(); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateConfigurationAsync(String resourceGroupName, String name, SiteConfigResourceInner siteConfig, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig), serviceCallback); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable createOrUpdateConfigurationAsync(String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + return createOrUpdateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig).map(new Func1, SiteConfigResourceInner>() { + @Override + public SiteConfigResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable> createOrUpdateConfigurationWithServiceResponseAsync(String resourceGroupName, String name, SiteConfigResourceInner 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = createOrUpdateConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteConfigResourceInner object if successful. + */ + public SiteConfigResourceInner updateConfiguration(String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + return updateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig).toBlocking().single().body(); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateConfigurationAsync(String resourceGroupName, String name, SiteConfigResourceInner siteConfig, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig), serviceCallback); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable updateConfigurationAsync(String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + return updateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig).map(new Func1, SiteConfigResourceInner>() { + @Override + public SiteConfigResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable> updateConfigurationWithServiceResponseAsync(String resourceGroupName, String name, SiteConfigResourceInner 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = updateConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteConfigurationSnapshotInfoInner> object if successful. + */ + public PagedList listConfigurationSnapshotInfo(final String resourceGroupName, final String name) { + ServiceResponse> response = listConfigurationSnapshotInfoSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listConfigurationSnapshotInfoNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listConfigurationSnapshotInfoAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listConfigurationSnapshotInfoSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listConfigurationSnapshotInfoNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigurationSnapshotInfoInner> object + */ + public Observable> listConfigurationSnapshotInfoAsync(final String resourceGroupName, final String name) { + return listConfigurationSnapshotInfoWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigurationSnapshotInfoInner> object + */ + public Observable>> listConfigurationSnapshotInfoWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listConfigurationSnapshotInfoSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listConfigurationSnapshotInfoNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteConfigurationSnapshotInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listConfigurationSnapshotInfoSinglePageAsync(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.listConfigurationSnapshotInfo(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 = listConfigurationSnapshotInfoDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationSnapshotInfoDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteConfigResourceInner object if successful. + */ + public SiteConfigResourceInner getConfigurationSnapshot(String resourceGroupName, String name, String snapshotId) { + return getConfigurationSnapshotWithServiceResponseAsync(resourceGroupName, name, snapshotId).toBlocking().single().body(); + } + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getConfigurationSnapshotAsync(String resourceGroupName, String name, String snapshotId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getConfigurationSnapshotWithServiceResponseAsync(resourceGroupName, name, snapshotId), serviceCallback); + } + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable getConfigurationSnapshotAsync(String resourceGroupName, String name, String snapshotId) { + return getConfigurationSnapshotWithServiceResponseAsync(resourceGroupName, name, snapshotId).map(new Func1, SiteConfigResourceInner>() { + @Override + public SiteConfigResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable> getConfigurationSnapshotWithServiceResponseAsync(String resourceGroupName, String name, String snapshotId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (snapshotId == null) { + throw new IllegalArgumentException("Parameter snapshotId 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.getConfigurationSnapshot(resourceGroupName, name, snapshotId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getConfigurationSnapshotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getConfigurationSnapshotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reverts the configuration of an app to a previous snapshot. + * Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void recoverSiteConfigurationSnapshot(String resourceGroupName, String name, String snapshotId) { + recoverSiteConfigurationSnapshotWithServiceResponseAsync(resourceGroupName, name, snapshotId).toBlocking().single().body(); + } + + /** + * Reverts the configuration of an app to a previous snapshot. + * Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture recoverSiteConfigurationSnapshotAsync(String resourceGroupName, String name, String snapshotId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(recoverSiteConfigurationSnapshotWithServiceResponseAsync(resourceGroupName, name, snapshotId), serviceCallback); + } + + /** + * Reverts the configuration of an app to a previous snapshot. + * Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable recoverSiteConfigurationSnapshotAsync(String resourceGroupName, String name, String snapshotId) { + return recoverSiteConfigurationSnapshotWithServiceResponseAsync(resourceGroupName, name, snapshotId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reverts the configuration of an app to a previous snapshot. + * Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> recoverSiteConfigurationSnapshotWithServiceResponseAsync(String resourceGroupName, String name, String snapshotId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (snapshotId == null) { + throw new IllegalArgumentException("Parameter snapshotId 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.recoverSiteConfigurationSnapshot(resourceGroupName, name, snapshotId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = recoverSiteConfigurationSnapshotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse recoverSiteConfigurationSnapshotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the last lines of docker logs for the given site. + * Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream getWebSiteContainerLogs(String resourceGroupName, String name) { + return getWebSiteContainerLogsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the last lines of docker logs for the given site. + * Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getWebSiteContainerLogsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWebSiteContainerLogsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the last lines of docker logs for the given site. + * Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable getWebSiteContainerLogsAsync(String resourceGroupName, String name) { + return getWebSiteContainerLogsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the last lines of docker logs for the given site. + * Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> getWebSiteContainerLogsWithServiceResponseAsync(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.getWebSiteContainerLogs(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 = getWebSiteContainerLogsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getWebSiteContainerLogsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream getWebSiteContainerLogsZip(String resourceGroupName, String name) { + return getWebSiteContainerLogsZipWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getWebSiteContainerLogsZipAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWebSiteContainerLogsZipWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable getWebSiteContainerLogsZipAsync(String resourceGroupName, String name) { + return getWebSiteContainerLogsZipWithServiceResponseAsync(resourceGroupName, name).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> getWebSiteContainerLogsZipWithServiceResponseAsync(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.getWebSiteContainerLogsZip(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 = getWebSiteContainerLogsZipDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getWebSiteContainerLogsZipDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContinuousWebJobInner> object if successful. + */ + public PagedList listContinuousWebJobs(final String resourceGroupName, final String name) { + ServiceResponse> response = listContinuousWebJobsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listContinuousWebJobsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listContinuousWebJobsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listContinuousWebJobsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listContinuousWebJobsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContinuousWebJobInner> object + */ + public Observable> listContinuousWebJobsAsync(final String resourceGroupName, final String name) { + return listContinuousWebJobsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContinuousWebJobInner> object + */ + public Observable>> listContinuousWebJobsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listContinuousWebJobsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listContinuousWebJobsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContinuousWebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listContinuousWebJobsSinglePageAsync(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.listContinuousWebJobs(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 = listContinuousWebJobsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listContinuousWebJobsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ContinuousWebJobInner object if successful. + */ + public ContinuousWebJobInner getContinuousWebJob(String resourceGroupName, String name, String webJobName) { + return getContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).toBlocking().single().body(); + } + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getContinuousWebJobAsync(String resourceGroupName, String name, String webJobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName), serviceCallback); + } + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContinuousWebJobInner object + */ + public Observable getContinuousWebJobAsync(String resourceGroupName, String name, String webJobName) { + return getContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).map(new Func1, ContinuousWebJobInner>() { + @Override + public ContinuousWebJobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContinuousWebJobInner object + */ + public Observable> getContinuousWebJobWithServiceResponseAsync(String resourceGroupName, String name, String webJobName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.getContinuousWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getContinuousWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getContinuousWebJobDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteContinuousWebJob(String resourceGroupName, String name, String webJobName) { + deleteContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).toBlocking().single().body(); + } + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteContinuousWebJobAsync(String resourceGroupName, String name, String webJobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName), serviceCallback); + } + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteContinuousWebJobAsync(String resourceGroupName, String name, String webJobName) { + return deleteContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteContinuousWebJobWithServiceResponseAsync(String resourceGroupName, String name, String webJobName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.deleteContinuousWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteContinuousWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteContinuousWebJobDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Start a continuous web job for an app, or a deployment slot. + * Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void startContinuousWebJob(String resourceGroupName, String name, String webJobName) { + startContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).toBlocking().single().body(); + } + + /** + * Start a continuous web job for an app, or a deployment slot. + * Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startContinuousWebJobAsync(String resourceGroupName, String name, String webJobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName), serviceCallback); + } + + /** + * Start a continuous web job for an app, or a deployment slot. + * Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable startContinuousWebJobAsync(String resourceGroupName, String name, String webJobName) { + return startContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start a continuous web job for an app, or a deployment slot. + * Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> startContinuousWebJobWithServiceResponseAsync(String resourceGroupName, String name, String webJobName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.startContinuousWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startContinuousWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse startContinuousWebJobDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stopContinuousWebJob(String resourceGroupName, String name, String webJobName) { + stopContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).toBlocking().single().body(); + } + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture stopContinuousWebJobAsync(String resourceGroupName, String name, String webJobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName), serviceCallback); + } + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable stopContinuousWebJobAsync(String resourceGroupName, String name, String webJobName) { + return stopContinuousWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> stopContinuousWebJobWithServiceResponseAsync(String resourceGroupName, String name, String webJobName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.stopContinuousWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopContinuousWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopContinuousWebJobDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DeploymentInner> object if successful. + */ + public PagedList listDeployments(final String resourceGroupName, final String name) { + ServiceResponse> response = listDeploymentsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDeploymentsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDeploymentsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDeploymentsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentInner> object + */ + 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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDeploymentsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.listDeployments(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 = listDeploymentsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDeploymentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DeploymentInner object if successful. + */ + public DeploymentInner getDeployment(String resourceGroupName, String name, String id) { + return getDeploymentWithServiceResponseAsync(resourceGroupName, name, id).toBlocking().single().body(); + } + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getDeploymentAsync(String resourceGroupName, String name, String id, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDeploymentWithServiceResponseAsync(resourceGroupName, name, id), serviceCallback); + } + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentInner object + */ + public Observable getDeploymentAsync(String resourceGroupName, String name, String id) { + return getDeploymentWithServiceResponseAsync(resourceGroupName, name, id).map(new Func1, DeploymentInner>() { + @Override + public DeploymentInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentInner object + */ + 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."); + } + 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); + } + } + }); + } + + private ServiceResponse getDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create a deployment for an app, or a deployment slot. + * Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DeploymentInner object if successful. + */ + public DeploymentInner createDeployment(String resourceGroupName, String name, String id, DeploymentInner deployment) { + return createDeploymentWithServiceResponseAsync(resourceGroupName, name, id, deployment).toBlocking().single().body(); + } + + /** + * Create a deployment for an app, or a deployment slot. + * Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param deployment Deployment details. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createDeploymentAsync(String resourceGroupName, String name, String id, DeploymentInner deployment, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createDeploymentWithServiceResponseAsync(resourceGroupName, name, id, deployment), serviceCallback); + } + + /** + * Create a deployment for an app, or a deployment slot. + * Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentInner object + */ + public Observable createDeploymentAsync(String resourceGroupName, String name, String id, DeploymentInner deployment) { + return createDeploymentWithServiceResponseAsync(resourceGroupName, name, id, deployment).map(new Func1, DeploymentInner>() { + @Override + public DeploymentInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a deployment for an app, or a deployment slot. + * Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentInner object + */ + 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 (deployment == null) { + throw new IllegalArgumentException("Parameter deployment is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = createDeploymentDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteDeployment(String resourceGroupName, String name, String id) { + deleteDeploymentWithServiceResponseAsync(resourceGroupName, name, id).toBlocking().single().body(); + } + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteDeploymentAsync(String resourceGroupName, String name, String id, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteDeploymentWithServiceResponseAsync(resourceGroupName, name, id), serviceCallback); + } + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteDeploymentAsync(String resourceGroupName, String name, String id) { + return deleteDeploymentWithServiceResponseAsync(resourceGroupName, name, id).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 (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."); + } + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DeploymentInner object if successful. + */ + public DeploymentInner listDeploymentLog(String resourceGroupName, String name, String id) { + return listDeploymentLogWithServiceResponseAsync(resourceGroupName, name, id).toBlocking().single().body(); + } + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listDeploymentLogAsync(String resourceGroupName, String name, String id, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listDeploymentLogWithServiceResponseAsync(resourceGroupName, name, id), serviceCallback); + } + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentInner object + */ + public Observable listDeploymentLogAsync(String resourceGroupName, String name, String id) { + return listDeploymentLogWithServiceResponseAsync(resourceGroupName, name, id).map(new Func1, DeploymentInner>() { + @Override + public DeploymentInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentInner object + */ + public Observable> listDeploymentLogWithServiceResponseAsync(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."); + } + final String apiVersion = "2016-08-01"; + return service.listDeploymentLog(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 = listDeploymentLogDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDeploymentLogDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IdentifierInner> object if successful. + */ + public PagedList listDomainOwnershipIdentifiers(final String resourceGroupName, final String name) { + ServiceResponse> response = listDomainOwnershipIdentifiersSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDomainOwnershipIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDomainOwnershipIdentifiersAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDomainOwnershipIdentifiersSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDomainOwnershipIdentifiersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable> listDomainOwnershipIdentifiersAsync(final String resourceGroupName, final String name) { + return listDomainOwnershipIdentifiersWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable>> listDomainOwnershipIdentifiersWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listDomainOwnershipIdentifiersSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDomainOwnershipIdentifiersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IdentifierInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDomainOwnershipIdentifiersSinglePageAsync(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.listDomainOwnershipIdentifiers(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 = listDomainOwnershipIdentifiersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDomainOwnershipIdentifiersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get domain ownership identifier for web app. + * Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IdentifierInner object if successful. + */ + public IdentifierInner getDomainOwnershipIdentifier(String resourceGroupName, String name, String domainOwnershipIdentifierName) { + return getDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName).toBlocking().single().body(); + } + + /** + * Get domain ownership identifier for web app. + * Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName), serviceCallback); + } + + /** + * Get domain ownership identifier for web app. + * Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable getDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName) { + return getDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName).map(new Func1, IdentifierInner>() { + @Override + public IdentifierInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get domain ownership identifier for web app. + * Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable> getDomainOwnershipIdentifierWithServiceResponseAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (domainOwnershipIdentifierName == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifierName 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.getDomainOwnershipIdentifier(resourceGroupName, name, domainOwnershipIdentifierName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDomainOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDomainOwnershipIdentifierDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IdentifierInner object if successful. + */ + public IdentifierInner createOrUpdateDomainOwnershipIdentifier(String resourceGroupName, String name, String domainOwnershipIdentifierName, IdentifierInner domainOwnershipIdentifier) { + return createOrUpdateDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier).toBlocking().single().body(); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, IdentifierInner domainOwnershipIdentifier, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier), serviceCallback); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable createOrUpdateDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, IdentifierInner domainOwnershipIdentifier) { + return createOrUpdateDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier).map(new Func1, IdentifierInner>() { + @Override + public IdentifierInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable> createOrUpdateDomainOwnershipIdentifierWithServiceResponseAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, IdentifierInner domainOwnershipIdentifier) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (domainOwnershipIdentifierName == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifierName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (domainOwnershipIdentifier == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifier is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateDomainOwnershipIdentifier(resourceGroupName, name, domainOwnershipIdentifierName, this.client.subscriptionId(), domainOwnershipIdentifier, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDomainOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDomainOwnershipIdentifierDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a domain ownership identifier for a web app. + * Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteDomainOwnershipIdentifier(String resourceGroupName, String name, String domainOwnershipIdentifierName) { + deleteDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName).toBlocking().single().body(); + } + + /** + * Deletes a domain ownership identifier for a web app. + * Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName), serviceCallback); + } + + /** + * Deletes a domain ownership identifier for a web app. + * Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName) { + return deleteDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a domain ownership identifier for a web app. + * Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteDomainOwnershipIdentifierWithServiceResponseAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (domainOwnershipIdentifierName == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifierName 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.deleteDomainOwnershipIdentifier(resourceGroupName, name, domainOwnershipIdentifierName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDomainOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDomainOwnershipIdentifierDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IdentifierInner object if successful. + */ + public IdentifierInner updateDomainOwnershipIdentifier(String resourceGroupName, String name, String domainOwnershipIdentifierName, IdentifierInner domainOwnershipIdentifier) { + return updateDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier).toBlocking().single().body(); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, IdentifierInner domainOwnershipIdentifier, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier), serviceCallback); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable updateDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, IdentifierInner domainOwnershipIdentifier) { + return updateDomainOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier).map(new Func1, IdentifierInner>() { + @Override + public IdentifierInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable> updateDomainOwnershipIdentifierWithServiceResponseAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, IdentifierInner domainOwnershipIdentifier) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (domainOwnershipIdentifierName == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifierName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (domainOwnershipIdentifier == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifier is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + final String apiVersion = "2016-08-01"; + return service.updateDomainOwnershipIdentifier(resourceGroupName, name, domainOwnershipIdentifierName, this.client.subscriptionId(), domainOwnershipIdentifier, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDomainOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDomainOwnershipIdentifierDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner getMSDeployStatus(String resourceGroupName, String name) { + return getMSDeployStatusWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMSDeployStatusAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMSDeployStatusWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable getMSDeployStatusAsync(String resourceGroupName, String name) { + return getMSDeployStatusWithServiceResponseAsync(resourceGroupName, name).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable> getMSDeployStatusWithServiceResponseAsync(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.getMSDeployStatus(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 = getMSDeployStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMSDeployStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner createMSDeployOperation(String resourceGroupName, String name, MSDeployInner mSDeploy) { + return createMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, mSDeploy).toBlocking().last().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createMSDeployOperationAsync(String resourceGroupName, String name, MSDeployInner mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createMSDeployOperationAsync(String resourceGroupName, String name, MSDeployInner mSDeploy) { + return createMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, mSDeploy).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createMSDeployOperationWithServiceResponseAsync(String resourceGroupName, String name, MSDeployInner mSDeploy) { + if (resourceGroupName == null) { + throw new 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 (mSDeploy == null) { + throw new IllegalArgumentException("Parameter mSDeploy is required and cannot be null."); + } + Validator.validate(mSDeploy); + final String apiVersion = "2016-08-01"; + Observable> observable = service.createMSDeployOperation(resourceGroupName, name, this.client.subscriptionId(), mSDeploy, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner beginCreateMSDeployOperation(String resourceGroupName, String name, MSDeployInner mSDeploy) { + return beginCreateMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, mSDeploy).toBlocking().single().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateMSDeployOperationAsync(String resourceGroupName, String name, MSDeployInner mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable beginCreateMSDeployOperationAsync(String resourceGroupName, String name, MSDeployInner mSDeploy) { + return beginCreateMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, mSDeploy).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable> beginCreateMSDeployOperationWithServiceResponseAsync(String resourceGroupName, String name, MSDeployInner mSDeploy) { + if (resourceGroupName == null) { + throw new 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 (mSDeploy == null) { + throw new IllegalArgumentException("Parameter mSDeploy is required and cannot be null."); + } + Validator.validate(mSDeploy); + final String apiVersion = "2016-08-01"; + return service.beginCreateMSDeployOperation(resourceGroupName, name, this.client.subscriptionId(), mSDeploy, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateMSDeployOperationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateMSDeployOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployLogInner object if successful. + */ + public MSDeployLogInner getMSDeployLog(String resourceGroupName, String name) { + return getMSDeployLogWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMSDeployLogAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMSDeployLogWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployLogInner object + */ + public Observable getMSDeployLogAsync(String resourceGroupName, String name) { + return getMSDeployLogWithServiceResponseAsync(resourceGroupName, name).map(new Func1, MSDeployLogInner>() { + @Override + public MSDeployLogInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployLogInner object + */ + public Observable> getMSDeployLogWithServiceResponseAsync(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.getMSDeployLog(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 = getMSDeployLogDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMSDeployLogDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<FunctionEnvelopeInner> object if successful. + */ + public PagedList listFunctions(final String resourceGroupName, final String name) { + ServiceResponse> response = listFunctionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listFunctionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listFunctionsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listFunctionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FunctionEnvelopeInner> object + */ + public Observable> listFunctionsAsync(final String resourceGroupName, final String name) { + return listFunctionsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FunctionEnvelopeInner> object + */ + public Observable>> listFunctionsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listFunctionsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listFunctionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FunctionEnvelopeInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listFunctionsSinglePageAsync(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.listFunctions(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 = listFunctionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listFunctionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String getFunctionsAdminToken(String resourceGroupName, String name) { + return getFunctionsAdminTokenWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getFunctionsAdminTokenAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFunctionsAdminTokenWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable getFunctionsAdminTokenAsync(String resourceGroupName, String name) { + return getFunctionsAdminTokenWithServiceResponseAsync(resourceGroupName, name).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> getFunctionsAdminTokenWithServiceResponseAsync(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.getFunctionsAdminToken(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 = getFunctionsAdminTokenDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFunctionsAdminTokenDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get function information by its ID for web site, or a deployment slot. + * Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FunctionEnvelopeInner object if successful. + */ + public FunctionEnvelopeInner getFunction(String resourceGroupName, String name, String functionName) { + return getFunctionWithServiceResponseAsync(resourceGroupName, name, functionName).toBlocking().single().body(); + } + + /** + * Get function information by its ID for web site, or a deployment slot. + * Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getFunctionAsync(String resourceGroupName, String name, String functionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFunctionWithServiceResponseAsync(resourceGroupName, name, functionName), serviceCallback); + } + + /** + * Get function information by its ID for web site, or a deployment slot. + * Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionEnvelopeInner object + */ + public Observable getFunctionAsync(String resourceGroupName, String name, String functionName) { + return getFunctionWithServiceResponseAsync(resourceGroupName, name, functionName).map(new Func1, FunctionEnvelopeInner>() { + @Override + public FunctionEnvelopeInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get function information by its ID for web site, or a deployment slot. + * Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionEnvelopeInner object + */ + public Observable> getFunctionWithServiceResponseAsync(String resourceGroupName, String name, String functionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (functionName == null) { + throw new IllegalArgumentException("Parameter functionName 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.getFunction(resourceGroupName, name, functionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getFunctionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFunctionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FunctionEnvelopeInner object if successful. + */ + public FunctionEnvelopeInner createFunction(String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + return createFunctionWithServiceResponseAsync(resourceGroupName, name, functionName, functionEnvelope).toBlocking().last().body(); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createFunctionAsync(String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createFunctionWithServiceResponseAsync(resourceGroupName, name, functionName, functionEnvelope), serviceCallback); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createFunctionAsync(String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + return createFunctionWithServiceResponseAsync(resourceGroupName, name, functionName, functionEnvelope).map(new Func1, FunctionEnvelopeInner>() { + @Override + public FunctionEnvelopeInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createFunctionWithServiceResponseAsync(String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (functionName == null) { + throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (functionEnvelope == null) { + throw new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null."); + } + Validator.validate(functionEnvelope); + final String apiVersion = "2016-08-01"; + Observable> observable = service.createFunction(resourceGroupName, name, functionName, this.client.subscriptionId(), functionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FunctionEnvelopeInner object if successful. + */ + public FunctionEnvelopeInner beginCreateFunction(String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + return beginCreateFunctionWithServiceResponseAsync(resourceGroupName, name, functionName, functionEnvelope).toBlocking().single().body(); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateFunctionAsync(String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateFunctionWithServiceResponseAsync(resourceGroupName, name, functionName, functionEnvelope), serviceCallback); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionEnvelopeInner object + */ + public Observable beginCreateFunctionAsync(String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + return beginCreateFunctionWithServiceResponseAsync(resourceGroupName, name, functionName, functionEnvelope).map(new Func1, FunctionEnvelopeInner>() { + @Override + public FunctionEnvelopeInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionEnvelopeInner object + */ + public Observable> beginCreateFunctionWithServiceResponseAsync(String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (functionName == null) { + throw new IllegalArgumentException("Parameter functionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (functionEnvelope == null) { + throw new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null."); + } + Validator.validate(functionEnvelope); + final String apiVersion = "2016-08-01"; + return service.beginCreateFunction(resourceGroupName, name, functionName, this.client.subscriptionId(), functionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateFunctionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateFunctionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a function for web site, or a deployment slot. + * Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteFunction(String resourceGroupName, String name, String functionName) { + deleteFunctionWithServiceResponseAsync(resourceGroupName, name, functionName).toBlocking().single().body(); + } + + /** + * Delete a function for web site, or a deployment slot. + * Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteFunctionAsync(String resourceGroupName, String name, String functionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteFunctionWithServiceResponseAsync(resourceGroupName, name, functionName), serviceCallback); + } + + /** + * Delete a function for web site, or a deployment slot. + * Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteFunctionAsync(String resourceGroupName, String name, String functionName) { + return deleteFunctionWithServiceResponseAsync(resourceGroupName, name, functionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a function for web site, or a deployment slot. + * Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteFunctionWithServiceResponseAsync(String resourceGroupName, String name, String functionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (functionName == null) { + throw new IllegalArgumentException("Parameter functionName 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.deleteFunction(resourceGroupName, name, functionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteFunctionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteFunctionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FunctionSecretsInner object if successful. + */ + public FunctionSecretsInner listFunctionSecrets(String resourceGroupName, String name, String functionName) { + return listFunctionSecretsWithServiceResponseAsync(resourceGroupName, name, functionName).toBlocking().single().body(); + } + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listFunctionSecretsAsync(String resourceGroupName, String name, String functionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listFunctionSecretsWithServiceResponseAsync(resourceGroupName, name, functionName), serviceCallback); + } + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionSecretsInner object + */ + public Observable listFunctionSecretsAsync(String resourceGroupName, String name, String functionName) { + return listFunctionSecretsWithServiceResponseAsync(resourceGroupName, name, functionName).map(new Func1, FunctionSecretsInner>() { + @Override + public FunctionSecretsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionSecretsInner object + */ + public Observable> listFunctionSecretsWithServiceResponseAsync(String resourceGroupName, String name, String functionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (functionName == null) { + throw new IllegalArgumentException("Parameter functionName 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.listFunctionSecrets(resourceGroupName, name, functionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listFunctionSecretsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listFunctionSecretsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<HostNameBindingInner> object if successful. + */ + public PagedList listHostNameBindings(final String resourceGroupName, final String name) { + ServiceResponse> response = listHostNameBindingsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listHostNameBindingsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHostNameBindingsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHostNameBindingsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HostNameBindingInner> object + */ + 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.body(); + } + }); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHostNameBindingsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.listHostNameBindings(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 = listHostNameBindingsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHostNameBindingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HostNameBindingInner object if successful. + */ + public HostNameBindingInner getHostNameBinding(String resourceGroupName, String name, String hostName) { + return getHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).toBlocking().single().body(); + } + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getHostNameBindingAsync(String resourceGroupName, String name, String hostName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName), serviceCallback); + } + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HostNameBindingInner object + */ + public Observable getHostNameBindingAsync(String resourceGroupName, String name, String hostName) { + return getHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).map(new Func1, HostNameBindingInner>() { + @Override + public HostNameBindingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + 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) { + try { + ServiceResponse clientResponse = getHostNameBindingDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @param hostNameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HostNameBindingInner object if successful. + */ + public HostNameBindingInner createOrUpdateHostNameBinding(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding) { + return createOrUpdateHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName, hostNameBinding).toBlocking().single().body(); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @param hostNameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateHostNameBindingAsync(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName, hostNameBinding), serviceCallback); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @param hostNameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HostNameBindingInner object + */ + public Observable createOrUpdateHostNameBindingAsync(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding) { + return createOrUpdateHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName, hostNameBinding).map(new Func1, HostNameBindingInner>() { + @Override + public HostNameBindingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @param hostNameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HostNameBindingInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = createOrUpdateHostNameBindingDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteHostNameBinding(String resourceGroupName, String name, String hostName) { + deleteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).toBlocking().single().body(); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteHostNameBindingAsync(String resourceGroupName, String name, String hostName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName), serviceCallback); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteHostNameBindingAsync(String resourceGroupName, String name, String hostName) { + return deleteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = deleteHostNameBindingDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionInner object if successful. + */ + public HybridConnectionInner getHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + return getHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().body(); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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-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) { + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionInner object if successful. + */ + public HybridConnectionInner createOrUpdateHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope) { + return createOrUpdateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope), serviceCallback); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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.body(); + } + }); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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 (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = createOrUpdateHybridConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateHybridConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().body(); + } + + /** + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); + } + + /** + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + return deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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-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) { + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionInner object if successful. + */ + public HybridConnectionInner updateHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope) { + return updateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope), serviceCallback); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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.body(); + } + }); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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 (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 (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + 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) { + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionKeyInner object if successful. + */ + public HybridConnectionKeyInner listHybridConnectionKeys(String resourceGroupName, String name, String namespaceName, String relayName) { + return listHybridConnectionKeysWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().body(); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listHybridConnectionKeysAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listHybridConnectionKeysWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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-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) { + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionInner object if successful. + */ + public HybridConnectionInner listHybridConnections(String resourceGroupName, String name) { + return listHybridConnectionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name The name of the web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listHybridConnectionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listHybridConnectionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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-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) { + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RelayServiceConnectionEntityInner object if successful. + */ + public RelayServiceConnectionEntityInner listRelayServiceConnections(String resourceGroupName, String name) { + return listRelayServiceConnectionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listRelayServiceConnectionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listRelayServiceConnectionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + public Observable listRelayServiceConnectionsAsync(String resourceGroupName, String name) { + return listRelayServiceConnectionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, RelayServiceConnectionEntityInner>() { + @Override + public RelayServiceConnectionEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + 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 (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.listRelayServiceConnections(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 = listRelayServiceConnectionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listRelayServiceConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a hybrid connection configuration by its name. + * Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RelayServiceConnectionEntityInner object if successful. + */ + public RelayServiceConnectionEntityInner getRelayServiceConnection(String resourceGroupName, String name, String entityName) { + return getRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).toBlocking().single().body(); + } + + /** + * Gets a hybrid connection configuration by its name. + * Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName), serviceCallback); + } + + /** + * Gets a hybrid connection configuration by its name. + * Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + public Observable getRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName) { + return getRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).map(new Func1, RelayServiceConnectionEntityInner>() { + @Override + public RelayServiceConnectionEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a hybrid connection configuration by its name. + * Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = getRelayServiceConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RelayServiceConnectionEntityInner object if successful. + */ + public RelayServiceConnectionEntityInner createOrUpdateRelayServiceConnection(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + return createOrUpdateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope), serviceCallback); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + public Observable createOrUpdateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + return createOrUpdateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).map(new Func1, RelayServiceConnectionEntityInner>() { + @Override + public RelayServiceConnectionEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + 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 (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 (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = createOrUpdateRelayServiceConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a relay service connection by its name. + * Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteRelayServiceConnection(String resourceGroupName, String name, String entityName) { + deleteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).toBlocking().single().body(); + } + + /** + * Deletes a relay service connection by its name. + * Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName), serviceCallback); + } + + /** + * Deletes a relay service connection by its name. + * Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName) { + return deleteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a relay service connection by its name. + * Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = deleteRelayServiceConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RelayServiceConnectionEntityInner object if successful. + */ + public RelayServiceConnectionEntityInner updateRelayServiceConnection(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + return updateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope), serviceCallback); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + public Observable updateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + return updateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).map(new Func1, RelayServiceConnectionEntityInner>() { + @Override + public RelayServiceConnectionEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + 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 (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 (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = updateRelayServiceConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInstanceInner> object if successful. + */ + public PagedList listInstanceIdentifiers(final String resourceGroupName, final String name) { + ServiceResponse> response = listInstanceIdentifiersSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceIdentifiersAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceIdentifiersSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceIdentifiersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInstanceInner> object + */ + 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.body(); + } + }); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInstanceInner> object + */ + 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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceIdentifiersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 (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.listInstanceIdentifiers(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 = listInstanceIdentifiersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceIdentifiersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner getInstanceMsDeployStatus(String resourceGroupName, String name, String instanceId) { + return getInstanceMsDeployStatusWithServiceResponseAsync(resourceGroupName, name, instanceId).toBlocking().single().body(); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceMsDeployStatusAsync(String resourceGroupName, String name, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceMsDeployStatusWithServiceResponseAsync(resourceGroupName, name, instanceId), serviceCallback); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable getInstanceMsDeployStatusAsync(String resourceGroupName, String name, String instanceId) { + return getInstanceMsDeployStatusWithServiceResponseAsync(resourceGroupName, name, instanceId).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable> getInstanceMsDeployStatusWithServiceResponseAsync(String resourceGroupName, String name, 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 (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.getInstanceMsDeployStatus(resourceGroupName, name, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceMsDeployStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceMsDeployStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner createInstanceMSDeployOperation(String resourceGroupName, String name, String instanceId, MSDeployInner mSDeploy) { + return createInstanceMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, instanceId, mSDeploy).toBlocking().last().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createInstanceMSDeployOperationAsync(String resourceGroupName, String name, String instanceId, MSDeployInner mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createInstanceMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, instanceId, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createInstanceMSDeployOperationAsync(String resourceGroupName, String name, String instanceId, MSDeployInner mSDeploy) { + return createInstanceMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, instanceId, mSDeploy).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createInstanceMSDeployOperationWithServiceResponseAsync(String resourceGroupName, String name, String instanceId, MSDeployInner mSDeploy) { + if (resourceGroupName == null) { + throw new 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (mSDeploy == null) { + throw new IllegalArgumentException("Parameter mSDeploy is required and cannot be null."); + } + Validator.validate(mSDeploy); + final String apiVersion = "2016-08-01"; + Observable> observable = service.createInstanceMSDeployOperation(resourceGroupName, name, instanceId, this.client.subscriptionId(), mSDeploy, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner beginCreateInstanceMSDeployOperation(String resourceGroupName, String name, String instanceId, MSDeployInner mSDeploy) { + return beginCreateInstanceMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, instanceId, mSDeploy).toBlocking().single().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateInstanceMSDeployOperationAsync(String resourceGroupName, String name, String instanceId, MSDeployInner mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateInstanceMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, instanceId, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable beginCreateInstanceMSDeployOperationAsync(String resourceGroupName, String name, String instanceId, MSDeployInner mSDeploy) { + return beginCreateInstanceMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, instanceId, mSDeploy).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable> beginCreateInstanceMSDeployOperationWithServiceResponseAsync(String resourceGroupName, String name, String instanceId, MSDeployInner mSDeploy) { + if (resourceGroupName == null) { + throw new 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (mSDeploy == null) { + throw new IllegalArgumentException("Parameter mSDeploy is required and cannot be null."); + } + Validator.validate(mSDeploy); + final String apiVersion = "2016-08-01"; + return service.beginCreateInstanceMSDeployOperation(resourceGroupName, name, instanceId, this.client.subscriptionId(), mSDeploy, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateInstanceMSDeployOperationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateInstanceMSDeployOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployLogInner object if successful. + */ + public MSDeployLogInner getInstanceMSDeployLog(String resourceGroupName, String name, String instanceId) { + return getInstanceMSDeployLogWithServiceResponseAsync(resourceGroupName, name, instanceId).toBlocking().single().body(); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceMSDeployLogAsync(String resourceGroupName, String name, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceMSDeployLogWithServiceResponseAsync(resourceGroupName, name, instanceId), serviceCallback); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployLogInner object + */ + public Observable getInstanceMSDeployLogAsync(String resourceGroupName, String name, String instanceId) { + return getInstanceMSDeployLogWithServiceResponseAsync(resourceGroupName, name, instanceId).map(new Func1, MSDeployLogInner>() { + @Override + public MSDeployLogInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployLogInner object + */ + public Observable> getInstanceMSDeployLogWithServiceResponseAsync(String resourceGroupName, String name, 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 (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.getInstanceMSDeployLog(resourceGroupName, name, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceMSDeployLogDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceMSDeployLogDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessInfoInner> object if successful. + */ + public PagedList listInstanceProcesses(final String resourceGroupName, final String name, final String instanceId) { + ServiceResponse> response = listInstanceProcessesSinglePageAsync(resourceGroupName, name, instanceId).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessesAsync(final String resourceGroupName, final String name, final String instanceId, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessesSinglePageAsync(resourceGroupName, name, instanceId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable> listInstanceProcessesAsync(final String resourceGroupName, final String name, final String instanceId) { + return listInstanceProcessesWithServiceResponseAsync(resourceGroupName, name, instanceId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable>> listInstanceProcessesWithServiceResponseAsync(final String resourceGroupName, final String name, final String instanceId) { + return listInstanceProcessesSinglePageAsync(resourceGroupName, name, instanceId) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessesSinglePageAsync(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 (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.listInstanceProcesses(resourceGroupName, name, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessInfoInner object if successful. + */ + public ProcessInfoInner getInstanceProcess(String resourceGroupName, String name, String processId, String instanceId) { + return getInstanceProcessWithServiceResponseAsync(resourceGroupName, name, processId, instanceId).toBlocking().single().body(); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceProcessAsync(String resourceGroupName, String name, String processId, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceProcessWithServiceResponseAsync(resourceGroupName, name, processId, instanceId), serviceCallback); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessInfoInner object + */ + public Observable getInstanceProcessAsync(String resourceGroupName, String name, String processId, String instanceId) { + return getInstanceProcessWithServiceResponseAsync(resourceGroupName, name, processId, instanceId).map(new Func1, ProcessInfoInner>() { + @Override + public ProcessInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessInfoInner object + */ + public Observable> getInstanceProcessWithServiceResponseAsync(String resourceGroupName, String name, String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.getInstanceProcess(resourceGroupName, name, processId, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceProcessDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteInstanceProcess(String resourceGroupName, String name, String processId, String instanceId) { + deleteInstanceProcessWithServiceResponseAsync(resourceGroupName, name, processId, instanceId).toBlocking().single().body(); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteInstanceProcessAsync(String resourceGroupName, String name, String processId, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteInstanceProcessWithServiceResponseAsync(resourceGroupName, name, processId, instanceId), serviceCallback); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteInstanceProcessAsync(String resourceGroupName, String name, String processId, String instanceId) { + return deleteInstanceProcessWithServiceResponseAsync(resourceGroupName, name, processId, instanceId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteInstanceProcessWithServiceResponseAsync(String resourceGroupName, String name, String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.deleteInstanceProcess(resourceGroupName, name, processId, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteInstanceProcessDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteInstanceProcessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream getInstanceProcessDump(String resourceGroupName, String name, String processId, String instanceId) { + return getInstanceProcessDumpWithServiceResponseAsync(resourceGroupName, name, processId, instanceId).toBlocking().single().body(); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceProcessDumpAsync(String resourceGroupName, String name, String processId, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceProcessDumpWithServiceResponseAsync(resourceGroupName, name, processId, instanceId), serviceCallback); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable getInstanceProcessDumpAsync(String resourceGroupName, String name, String processId, String instanceId) { + return getInstanceProcessDumpWithServiceResponseAsync(resourceGroupName, name, processId, instanceId).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> getInstanceProcessDumpWithServiceResponseAsync(String resourceGroupName, String name, String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.getInstanceProcessDump(resourceGroupName, name, processId, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceProcessDumpDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessDumpDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessModuleInfoInner> object if successful. + */ + public PagedList listInstanceProcessModules(final String resourceGroupName, final String name, final String processId, final String instanceId) { + ServiceResponse> response = listInstanceProcessModulesSinglePageAsync(resourceGroupName, name, processId, instanceId).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessModulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessModulesAsync(final String resourceGroupName, final String name, final String processId, final String instanceId, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessModulesSinglePageAsync(resourceGroupName, name, processId, instanceId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessModulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable> listInstanceProcessModulesAsync(final String resourceGroupName, final String name, final String processId, final String instanceId) { + return listInstanceProcessModulesWithServiceResponseAsync(resourceGroupName, name, processId, instanceId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable>> listInstanceProcessModulesWithServiceResponseAsync(final String resourceGroupName, final String name, final String processId, final String instanceId) { + return listInstanceProcessModulesSinglePageAsync(resourceGroupName, name, processId, instanceId) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessModulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param processId PID. + ServiceResponse> * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessModuleInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessModulesSinglePageAsync(final String resourceGroupName, final String name, final String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.listInstanceProcessModules(resourceGroupName, name, processId, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessModulesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessModulesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessModuleInfoInner object if successful. + */ + public ProcessModuleInfoInner getInstanceProcessModule(String resourceGroupName, String name, String processId, String baseAddress, String instanceId) { + return getInstanceProcessModuleWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress, instanceId).toBlocking().single().body(); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceProcessModuleAsync(String resourceGroupName, String name, String processId, String baseAddress, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceProcessModuleWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress, instanceId), serviceCallback); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessModuleInfoInner object + */ + public Observable getInstanceProcessModuleAsync(String resourceGroupName, String name, String processId, String baseAddress, String instanceId) { + return getInstanceProcessModuleWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress, instanceId).map(new Func1, ProcessModuleInfoInner>() { + @Override + public ProcessModuleInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessModuleInfoInner object + */ + public Observable> getInstanceProcessModuleWithServiceResponseAsync(String resourceGroupName, String name, String processId, String baseAddress, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId is required and cannot be null."); + } + if (baseAddress == null) { + throw new IllegalArgumentException("Parameter baseAddress 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.getInstanceProcessModule(resourceGroupName, name, processId, baseAddress, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceProcessModuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessModuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessThreadInfoInner> object if successful. + */ + public PagedList listInstanceProcessThreads(final String resourceGroupName, final String name, final String processId, final String instanceId) { + ServiceResponse> response = listInstanceProcessThreadsSinglePageAsync(resourceGroupName, name, processId, instanceId).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessThreadsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessThreadsAsync(final String resourceGroupName, final String name, final String processId, final String instanceId, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessThreadsSinglePageAsync(resourceGroupName, name, processId, instanceId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessThreadsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable> listInstanceProcessThreadsAsync(final String resourceGroupName, final String name, final String processId, final String instanceId) { + return listInstanceProcessThreadsWithServiceResponseAsync(resourceGroupName, name, processId, instanceId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable>> listInstanceProcessThreadsWithServiceResponseAsync(final String resourceGroupName, final String name, final String processId, final String instanceId) { + return listInstanceProcessThreadsSinglePageAsync(resourceGroupName, name, processId, instanceId) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessThreadsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param processId PID. + ServiceResponse> * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessThreadInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessThreadsSinglePageAsync(final String resourceGroupName, final String name, final String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.listInstanceProcessThreads(resourceGroupName, name, processId, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessThreadsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessThreadsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessThreadInfoInner object if successful. + */ + public ProcessThreadInfoInner getInstanceProcessThread(String resourceGroupName, String name, String processId, String threadId, String instanceId) { + return getInstanceProcessThreadWithServiceResponseAsync(resourceGroupName, name, processId, threadId, instanceId).toBlocking().single().body(); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceProcessThreadAsync(String resourceGroupName, String name, String processId, String threadId, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceProcessThreadWithServiceResponseAsync(resourceGroupName, name, processId, threadId, instanceId), serviceCallback); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessThreadInfoInner object + */ + public Observable getInstanceProcessThreadAsync(String resourceGroupName, String name, String processId, String threadId, String instanceId) { + return getInstanceProcessThreadWithServiceResponseAsync(resourceGroupName, name, processId, threadId, instanceId).map(new Func1, ProcessThreadInfoInner>() { + @Override + public ProcessThreadInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessThreadInfoInner object + */ + public Observable> getInstanceProcessThreadWithServiceResponseAsync(String resourceGroupName, String name, String processId, String threadId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId is required and cannot be null."); + } + if (threadId == null) { + throw new IllegalArgumentException("Parameter threadId 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.getInstanceProcessThread(resourceGroupName, name, processId, threadId, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceProcessThreadDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessThreadDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteCloneabilityInner object if successful. + */ + public SiteCloneabilityInner isCloneable(String resourceGroupName, String name) { + return isCloneableWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture isCloneableAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(isCloneableWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteCloneabilityInner object + */ + public Observable isCloneableAsync(String resourceGroupName, String name) { + return isCloneableWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteCloneabilityInner>() { + @Override + public SiteCloneabilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteCloneabilityInner object + */ + 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 (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.isCloneable(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 = isCloneableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse isCloneableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * This is to allow calling via powershell and ARM template. + * This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FunctionSecretsInner object if successful. + */ + public FunctionSecretsInner listSyncFunctionTriggers(String resourceGroupName, String name) { + return listSyncFunctionTriggersWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * This is to allow calling via powershell and ARM template. + * This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listSyncFunctionTriggersAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listSyncFunctionTriggersWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * This is to allow calling via powershell and ARM template. + * This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionSecretsInner object + */ + public Observable listSyncFunctionTriggersAsync(String resourceGroupName, String name) { + return listSyncFunctionTriggersWithServiceResponseAsync(resourceGroupName, name).map(new Func1, FunctionSecretsInner>() { + @Override + public FunctionSecretsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * This is to allow calling via powershell and ARM template. + * This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionSecretsInner object + */ + public Observable> listSyncFunctionTriggersWithServiceResponseAsync(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.listSyncFunctionTriggers(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 = listSyncFunctionTriggersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSyncFunctionTriggersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listMetricDefinitions(final String resourceGroupName, final String name) { + ServiceResponse> response = listMetricDefinitionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricDefinitionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricDefinitionsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricDefinitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable> listMetricDefinitionsAsync(final String resourceGroupName, final String name) { + return listMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable>> listMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMetricDefinitionsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricDefinitionsSinglePageAsync(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.listMetricDefinitions(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 = listMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMetrics(final String resourceGroupName, final String name) { + ServiceResponse> response = listMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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-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) { + try { + ServiceResponse> result = listMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param details Specify "true" to include metric details in the response. It is "false" by default. + * @param filter Return only metrics specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param details Specify "true" to include metric details in the response. It is "false" by default. + * @param filter Return only metrics specified in the filter (using OData syntax). For 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSinglePageAsync(resourceGroupName, name, details, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param details Specify "true" to include metric details in the response. It is "false" by default. + * @param filter Return only metrics specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param details Specify "true" to include metric details in the response. It is "false" by default. + * @param filter Return only metrics specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param details Specify "true" to include metric details in the response. It is "false" by default. + ServiceResponse> * @param filter Return only metrics specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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-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) { + try { + ServiceResponse> result = listMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Restores a web app. + * Restores a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param subscriptionName Azure subscription. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StorageMigrationResponseInner object if successful. + */ + public StorageMigrationResponseInner migrateStorage(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner migrationOptions) { + return migrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions).toBlocking().last().body(); + } + + /** + * Restores a web app. + * Restores a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param subscriptionName Azure subscription. + * @param migrationOptions Migration migrationOptions. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture migrateStorageAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner migrationOptions, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(migrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions), serviceCallback); + } + + /** + * Restores a web app. + * Restores a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param subscriptionName Azure subscription. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable migrateStorageAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner migrationOptions) { + return migrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions).map(new Func1, StorageMigrationResponseInner>() { + @Override + public StorageMigrationResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a web app. + * Restores a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param subscriptionName Azure subscription. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> migrateStorageWithServiceResponseAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner migrationOptions) { + if (resourceGroupName == null) { + throw new 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 (subscriptionName == null) { + throw new IllegalArgumentException("Parameter subscriptionName is required and cannot be null."); + } + if (migrationOptions == null) { + throw new IllegalArgumentException("Parameter migrationOptions is required and cannot be null."); + } + Validator.validate(migrationOptions); + final String apiVersion = "2016-08-01"; + Observable> observable = service.migrateStorage(resourceGroupName, name, this.client.subscriptionId(), subscriptionName, migrationOptions, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Restores a web app. + * Restores a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param subscriptionName Azure subscription. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StorageMigrationResponseInner object if successful. + */ + public StorageMigrationResponseInner beginMigrateStorage(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner migrationOptions) { + return beginMigrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions).toBlocking().single().body(); + } + + /** + * Restores a web app. + * Restores a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param subscriptionName Azure subscription. + * @param migrationOptions Migration migrationOptions. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginMigrateStorageAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner migrationOptions, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginMigrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions), serviceCallback); + } + + /** + * Restores a web app. + * Restores a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param subscriptionName Azure subscription. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageMigrationResponseInner object + */ + public Observable beginMigrateStorageAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner migrationOptions) { + return beginMigrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions).map(new Func1, StorageMigrationResponseInner>() { + @Override + public StorageMigrationResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a web app. + * Restores a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param subscriptionName Azure subscription. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageMigrationResponseInner object + */ + public Observable> beginMigrateStorageWithServiceResponseAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner migrationOptions) { + if (resourceGroupName == null) { + throw new 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 (subscriptionName == null) { + throw new IllegalArgumentException("Parameter subscriptionName is required and cannot be null."); + } + if (migrationOptions == null) { + throw new IllegalArgumentException("Parameter migrationOptions is required and cannot be null."); + } + Validator.validate(migrationOptions); + final String apiVersion = "2016-08-01"; + return service.beginMigrateStorage(resourceGroupName, name, this.client.subscriptionId(), subscriptionName, migrationOptions, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginMigrateStorageDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginMigrateStorageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationInner object if successful. + */ + public OperationInner migrateMySql(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope) { + return migrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope).toBlocking().last().body(); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture migrateMySqlAsync(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(migrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope), serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable migrateMySqlAsync(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope) { + return migrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope).map(new Func1, OperationInner>() { + @Override + public OperationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (migrationRequestEnvelope == null) { + throw new IllegalArgumentException("Parameter migrationRequestEnvelope is required and cannot be null."); + } + 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()); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationInner object if successful. + */ + public OperationInner beginMigrateMySql(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope) { + return beginMigrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope).toBlocking().single().body(); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginMigrateMySqlAsync(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginMigrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope), serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationInner object + */ + public Observable beginMigrateMySqlAsync(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope) { + return beginMigrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope).map(new Func1, OperationInner>() { + @Override + public OperationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationInner object + */ + 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (migrationRequestEnvelope == null) { + throw new IllegalArgumentException("Parameter migrationRequestEnvelope is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = beginMigrateMySqlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginMigrateMySqlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MigrateMySqlStatusInner object if successful. + */ + public MigrateMySqlStatusInner getMigrateMySqlStatus(String resourceGroupName, String name) { + return getMigrateMySqlStatusWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMigrateMySqlStatusAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMigrateMySqlStatusWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MigrateMySqlStatusInner object + */ + public Observable getMigrateMySqlStatusAsync(String resourceGroupName, String name) { + return getMigrateMySqlStatusWithServiceResponseAsync(resourceGroupName, name).map(new Func1, MigrateMySqlStatusInner>() { + @Override + public MigrateMySqlStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MigrateMySqlStatusInner object + */ + public Observable> getMigrateMySqlStatusWithServiceResponseAsync(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.getMigrateMySqlStatus(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 = getMigrateMySqlStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMigrateMySqlStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. This can either be "summary" or "detailed". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkFeaturesInner object if successful. + */ + public NetworkFeaturesInner listNetworkFeatures(String resourceGroupName, String name, String view) { + return listNetworkFeaturesWithServiceResponseAsync(resourceGroupName, name, view).toBlocking().single().body(); + } + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listNetworkFeaturesAsync(String resourceGroupName, String name, String view, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listNetworkFeaturesWithServiceResponseAsync(resourceGroupName, name, view), serviceCallback); + } + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. This can either be "summary" or "detailed". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkFeaturesInner object + */ + public Observable listNetworkFeaturesAsync(String resourceGroupName, String name, String view) { + return listNetworkFeaturesWithServiceResponseAsync(resourceGroupName, name, view).map(new Func1, NetworkFeaturesInner>() { + @Override + public NetworkFeaturesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. This can either be "summary" or "detailed". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkFeaturesInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = listNetworkFeaturesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listNetworkFeaturesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String startWebSiteNetworkTrace(String resourceGroupName, String name) { + return startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startWebSiteNetworkTraceAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable startWebSiteNetworkTraceAsync(String resourceGroupName, String name) { + return startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return service.startWebSiteNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startWebSiteNetworkTraceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String startWebSiteNetworkTrace(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startWebSiteNetworkTraceAsync(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable startWebSiteNetworkTraceAsync(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> startWebSiteNetworkTraceWithServiceResponseAsync(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + if (resourceGroupName == null) { + throw new 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.startWebSiteNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startWebSiteNetworkTraceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse startWebSiteNetworkTraceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String stopWebSiteNetworkTrace(String resourceGroupName, String name) { + return stopWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture stopWebSiteNetworkTraceAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable stopWebSiteNetworkTraceAsync(String resourceGroupName, String name) { + return stopWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> stopWebSiteNetworkTraceWithServiceResponseAsync(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.stopWebSiteNetworkTrace(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 = stopWebSiteNetworkTraceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopWebSiteNetworkTraceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void generateNewSitePublishingPassword(String resourceGroupName, String name) { + generateNewSitePublishingPasswordWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture generateNewSitePublishingPasswordAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(generateNewSitePublishingPasswordWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable generateNewSitePublishingPasswordAsync(String resourceGroupName, String name) { + return generateNewSitePublishingPasswordWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> generateNewSitePublishingPasswordWithServiceResponseAsync(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.generateNewSitePublishingPassword(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 = generateNewSitePublishingPasswordDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse generateNewSitePublishingPasswordDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PerfMonResponseInner> object if successful. + */ + public PagedList listPerfMonCounters(final String resourceGroupName, final String name) { + ServiceResponse> response = listPerfMonCountersSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPerfMonCountersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPerfMonCountersAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + 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.body().nextPageLink(); + 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. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PerfMonResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.listPerfMonCounters(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 = listPerfMonCountersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PerfMonResponseInner> object if successful. + */ + public PagedList listPerfMonCounters(final String resourceGroupName, final String name, final String filter) { + ServiceResponse> response = listPerfMonCountersSinglePageAsync(resourceGroupName, name, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPerfMonCountersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPerfMonCountersAsync(final String resourceGroupName, final String name, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPerfMonCountersSinglePageAsync(resourceGroupName, name, filter), + 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 the resource group to which the resource belongs. + * @param name Name of 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + 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.body(); + } + }); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + 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 the resource group to which the resource belongs. + 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PerfMonResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.listPerfMonCounters(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 = listPerfMonCountersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPerfMonCountersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets web app's event logs. + * Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SitePhpErrorLogFlagInner object if successful. + */ + public SitePhpErrorLogFlagInner getSitePhpErrorLogFlag(String resourceGroupName, String name) { + return getSitePhpErrorLogFlagWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets web app's event logs. + * Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSitePhpErrorLogFlagAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSitePhpErrorLogFlagWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets web app's event logs. + * Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SitePhpErrorLogFlagInner object + */ + public Observable getSitePhpErrorLogFlagAsync(String resourceGroupName, String name) { + return getSitePhpErrorLogFlagWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SitePhpErrorLogFlagInner>() { + @Override + public SitePhpErrorLogFlagInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets web app's event logs. + * Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SitePhpErrorLogFlagInner object + */ + 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 (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.getSitePhpErrorLogFlag(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 = getSitePhpErrorLogFlagDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSitePhpErrorLogFlagDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the premier add-ons of an app. + * Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PremierAddOnInner object if successful. + */ + public PremierAddOnInner listPremierAddOns(String resourceGroupName, String name) { + return listPremierAddOnsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the premier add-ons of an app. + * Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listPremierAddOnsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listPremierAddOnsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the premier add-ons of an app. + * Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + public Observable listPremierAddOnsAsync(String resourceGroupName, String name) { + return listPremierAddOnsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, PremierAddOnInner>() { + @Override + public PremierAddOnInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the premier add-ons of an app. + * Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + public Observable> listPremierAddOnsWithServiceResponseAsync(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.listPremierAddOns(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 = listPremierAddOnsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listPremierAddOnsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a named add-on of an app. + * Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PremierAddOnInner object if successful. + */ + public PremierAddOnInner getPremierAddOn(String resourceGroupName, String name, String premierAddOnName) { + return getPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName).toBlocking().single().body(); + } + + /** + * Gets a named add-on of an app. + * Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getPremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName), serviceCallback); + } + + /** + * Gets a named add-on of an app. + * Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + public Observable getPremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName) { + return getPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName).map(new Func1, PremierAddOnInner>() { + @Override + public PremierAddOnInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a named add-on of an app. + * Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = getPremierAddOnDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates a named add-on of an app. + * Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PremierAddOnInner object if successful. + */ + public PremierAddOnInner addPremierAddOn(String resourceGroupName, String name, String premierAddOnName, PremierAddOnInner premierAddOn) { + return addPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn).toBlocking().single().body(); + } + + /** + * Updates a named add-on of an app. + * Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addPremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnInner premierAddOn, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn), serviceCallback); + } + + /** + * Updates a named add-on of an app. + * Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + public Observable addPremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnInner premierAddOn) { + return addPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn).map(new Func1, PremierAddOnInner>() { + @Override + public PremierAddOnInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a named add-on of an app. + * Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + public Observable> addPremierAddOnWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnInner 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 (premierAddOn == null) { + throw new IllegalArgumentException("Parameter premierAddOn is required and cannot be null."); + } + 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 = addPremierAddOnDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addPremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a premier add-on from an app. + * Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deletePremierAddOn(String resourceGroupName, String name, String premierAddOnName) { + deletePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName).toBlocking().single().body(); + } + + /** + * Delete a premier add-on from an app. + * Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deletePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deletePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName), serviceCallback); + } + + /** + * Delete a premier add-on from an app. + * Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deletePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName) { + return deletePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a premier add-on from an app. + * Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = deletePremierAddOnDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deletePremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessInfoInner> object if successful. + */ + public PagedList listProcesses(final String resourceGroupName, final String name) { + ServiceResponse> response = listProcessesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessesSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable> listProcessesAsync(final String resourceGroupName, final String name) { + return listProcessesWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable>> listProcessesWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listProcessesSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessesSinglePageAsync(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.listProcesses(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 = listProcessesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessInfoInner object if successful. + */ + public ProcessInfoInner getProcess(String resourceGroupName, String name, String processId) { + return getProcessWithServiceResponseAsync(resourceGroupName, name, processId).toBlocking().single().body(); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getProcessAsync(String resourceGroupName, String name, String processId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getProcessWithServiceResponseAsync(resourceGroupName, name, processId), serviceCallback); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessInfoInner object + */ + public Observable getProcessAsync(String resourceGroupName, String name, String processId) { + return getProcessWithServiceResponseAsync(resourceGroupName, name, processId).map(new Func1, ProcessInfoInner>() { + @Override + public ProcessInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessInfoInner object + */ + public Observable> getProcessWithServiceResponseAsync(String resourceGroupName, String name, String processId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.getProcess(resourceGroupName, name, processId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteProcess(String resourceGroupName, String name, String processId) { + deleteProcessWithServiceResponseAsync(resourceGroupName, name, processId).toBlocking().single().body(); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteProcessAsync(String resourceGroupName, String name, String processId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteProcessWithServiceResponseAsync(resourceGroupName, name, processId), serviceCallback); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteProcessAsync(String resourceGroupName, String name, String processId) { + return deleteProcessWithServiceResponseAsync(resourceGroupName, name, processId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteProcessWithServiceResponseAsync(String resourceGroupName, String name, String processId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.deleteProcess(resourceGroupName, name, processId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteProcessDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteProcessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream getProcessDump(String resourceGroupName, String name, String processId) { + return getProcessDumpWithServiceResponseAsync(resourceGroupName, name, processId).toBlocking().single().body(); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getProcessDumpAsync(String resourceGroupName, String name, String processId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getProcessDumpWithServiceResponseAsync(resourceGroupName, name, processId), serviceCallback); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable getProcessDumpAsync(String resourceGroupName, String name, String processId) { + return getProcessDumpWithServiceResponseAsync(resourceGroupName, name, processId).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> getProcessDumpWithServiceResponseAsync(String resourceGroupName, String name, String processId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.getProcessDump(resourceGroupName, name, processId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessDumpDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessDumpDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessModuleInfoInner> object if successful. + */ + public PagedList listProcessModules(final String resourceGroupName, final String name, final String processId) { + ServiceResponse> response = listProcessModulesSinglePageAsync(resourceGroupName, name, processId).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessModulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessModulesAsync(final String resourceGroupName, final String name, final String processId, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessModulesSinglePageAsync(resourceGroupName, name, processId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessModulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable> listProcessModulesAsync(final String resourceGroupName, final String name, final String processId) { + return listProcessModulesWithServiceResponseAsync(resourceGroupName, name, processId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable>> listProcessModulesWithServiceResponseAsync(final String resourceGroupName, final String name, final String processId) { + return listProcessModulesSinglePageAsync(resourceGroupName, name, processId) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessModulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessModuleInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessModulesSinglePageAsync(final String resourceGroupName, final String name, final String processId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.listProcessModules(resourceGroupName, name, processId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessModulesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessModulesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessModuleInfoInner object if successful. + */ + public ProcessModuleInfoInner getProcessModule(String resourceGroupName, String name, String processId, String baseAddress) { + return getProcessModuleWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress).toBlocking().single().body(); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getProcessModuleAsync(String resourceGroupName, String name, String processId, String baseAddress, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getProcessModuleWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress), serviceCallback); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessModuleInfoInner object + */ + public Observable getProcessModuleAsync(String resourceGroupName, String name, String processId, String baseAddress) { + return getProcessModuleWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress).map(new Func1, ProcessModuleInfoInner>() { + @Override + public ProcessModuleInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessModuleInfoInner object + */ + public Observable> getProcessModuleWithServiceResponseAsync(String resourceGroupName, String name, String processId, String baseAddress) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (processId == null) { + throw new IllegalArgumentException("Parameter processId is required and cannot be null."); + } + if (baseAddress == null) { + throw new IllegalArgumentException("Parameter baseAddress 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.getProcessModule(resourceGroupName, name, processId, baseAddress, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessModuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessModuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessThreadInfoInner> object if successful. + */ + public PagedList listProcessThreads(final String resourceGroupName, final String name, final String processId) { + ServiceResponse> response = listProcessThreadsSinglePageAsync(resourceGroupName, name, processId).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessThreadsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessThreadsAsync(final String resourceGroupName, final String name, final String processId, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessThreadsSinglePageAsync(resourceGroupName, name, processId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessThreadsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable> listProcessThreadsAsync(final String resourceGroupName, final String name, final String processId) { + return listProcessThreadsWithServiceResponseAsync(resourceGroupName, name, processId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable>> listProcessThreadsWithServiceResponseAsync(final String resourceGroupName, final String name, final String processId) { + return listProcessThreadsSinglePageAsync(resourceGroupName, name, processId) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessThreadsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessThreadInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessThreadsSinglePageAsync(final String resourceGroupName, final String name, final String processId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.listProcessThreads(resourceGroupName, name, processId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessThreadsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessThreadsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessThreadInfoInner object if successful. + */ + public ProcessThreadInfoInner getProcessThread(String resourceGroupName, String name, String processId, String threadId) { + return getProcessThreadWithServiceResponseAsync(resourceGroupName, name, processId, threadId).toBlocking().single().body(); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getProcessThreadAsync(String resourceGroupName, String name, String processId, String threadId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getProcessThreadWithServiceResponseAsync(resourceGroupName, name, processId, threadId), serviceCallback); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessThreadInfoInner object + */ + public Observable getProcessThreadAsync(String resourceGroupName, String name, String processId, String threadId) { + return getProcessThreadWithServiceResponseAsync(resourceGroupName, name, processId, threadId).map(new Func1, ProcessThreadInfoInner>() { + @Override + public ProcessThreadInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessThreadInfoInner object + */ + public Observable> getProcessThreadWithServiceResponseAsync(String resourceGroupName, String name, String processId, String threadId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (processId == null) { + throw new IllegalArgumentException("Parameter processId is required and cannot be null."); + } + if (threadId == null) { + throw new IllegalArgumentException("Parameter threadId 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.getProcessThread(resourceGroupName, name, processId, threadId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessThreadDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessThreadDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PublicCertificateInner> object if successful. + */ + public PagedList listPublicCertificates(final String resourceGroupName, final String name) { + ServiceResponse> response = listPublicCertificatesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPublicCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPublicCertificatesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPublicCertificatesSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPublicCertificatesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicCertificateInner> object + */ + public Observable> listPublicCertificatesAsync(final String resourceGroupName, final String name) { + return listPublicCertificatesWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicCertificateInner> object + */ + public Observable>> listPublicCertificatesWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listPublicCertificatesSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPublicCertificatesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicCertificateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPublicCertificatesSinglePageAsync(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.listPublicCertificates(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 = listPublicCertificatesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPublicCertificatesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PublicCertificateInner object if successful. + */ + public PublicCertificateInner getPublicCertificate(String resourceGroupName, String name, String publicCertificateName) { + return getPublicCertificateWithServiceResponseAsync(resourceGroupName, name, publicCertificateName).toBlocking().single().body(); + } + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getPublicCertificateAsync(String resourceGroupName, String name, String publicCertificateName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPublicCertificateWithServiceResponseAsync(resourceGroupName, name, publicCertificateName), serviceCallback); + } + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicCertificateInner object + */ + public Observable getPublicCertificateAsync(String resourceGroupName, String name, String publicCertificateName) { + return getPublicCertificateWithServiceResponseAsync(resourceGroupName, name, publicCertificateName).map(new Func1, PublicCertificateInner>() { + @Override + public PublicCertificateInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicCertificateInner object + */ + public Observable> getPublicCertificateWithServiceResponseAsync(String resourceGroupName, String name, String publicCertificateName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (publicCertificateName == null) { + throw new IllegalArgumentException("Parameter publicCertificateName 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.getPublicCertificate(resourceGroupName, name, publicCertificateName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPublicCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPublicCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PublicCertificateInner object if successful. + */ + public PublicCertificateInner createOrUpdatePublicCertificate(String resourceGroupName, String name, String publicCertificateName, PublicCertificateInner publicCertificate) { + return createOrUpdatePublicCertificateWithServiceResponseAsync(resourceGroupName, name, publicCertificateName, publicCertificate).toBlocking().single().body(); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate object. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdatePublicCertificateAsync(String resourceGroupName, String name, String publicCertificateName, PublicCertificateInner publicCertificate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdatePublicCertificateWithServiceResponseAsync(resourceGroupName, name, publicCertificateName, publicCertificate), serviceCallback); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicCertificateInner object + */ + public Observable createOrUpdatePublicCertificateAsync(String resourceGroupName, String name, String publicCertificateName, PublicCertificateInner publicCertificate) { + return createOrUpdatePublicCertificateWithServiceResponseAsync(resourceGroupName, name, publicCertificateName, publicCertificate).map(new Func1, PublicCertificateInner>() { + @Override + public PublicCertificateInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicCertificateInner object + */ + public Observable> createOrUpdatePublicCertificateWithServiceResponseAsync(String resourceGroupName, String name, String publicCertificateName, PublicCertificateInner publicCertificate) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (publicCertificateName == null) { + throw new IllegalArgumentException("Parameter publicCertificateName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (publicCertificate == null) { + throw new IllegalArgumentException("Parameter publicCertificate is required and cannot be null."); + } + Validator.validate(publicCertificate); + final String apiVersion = "2016-08-01"; + return service.createOrUpdatePublicCertificate(resourceGroupName, name, publicCertificateName, this.client.subscriptionId(), publicCertificate, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdatePublicCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdatePublicCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deletePublicCertificate(String resourceGroupName, String name, String publicCertificateName) { + deletePublicCertificateWithServiceResponseAsync(resourceGroupName, name, publicCertificateName).toBlocking().single().body(); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deletePublicCertificateAsync(String resourceGroupName, String name, String publicCertificateName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deletePublicCertificateWithServiceResponseAsync(resourceGroupName, name, publicCertificateName), serviceCallback); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deletePublicCertificateAsync(String resourceGroupName, String name, String publicCertificateName) { + return deletePublicCertificateWithServiceResponseAsync(resourceGroupName, name, publicCertificateName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deletePublicCertificateWithServiceResponseAsync(String resourceGroupName, String name, String publicCertificateName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (publicCertificateName == null) { + throw new IllegalArgumentException("Parameter publicCertificateName 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.deletePublicCertificate(resourceGroupName, name, publicCertificateName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deletePublicCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deletePublicCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream listPublishingProfileXmlWithSecrets(String resourceGroupName, String name) { + return listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listPublishingProfileXmlWithSecretsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable listPublishingProfileXmlWithSecretsAsync(String resourceGroupName, String name) { + return listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + final PublishingProfileFormat format = null; + CsmPublishingProfileOptions publishingProfileOptions = new CsmPublishingProfileOptions(); + publishingProfileOptions.withFormat(null); + return service.listPublishingProfileXmlWithSecrets(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), publishingProfileOptions, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listPublishingProfileXmlWithSecretsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream listPublishingProfileXmlWithSecrets(String resourceGroupName, String name, PublishingProfileFormat format) { + return listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name, format).toBlocking().single().body(); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listPublishingProfileXmlWithSecretsAsync(String resourceGroupName, String name, PublishingProfileFormat format, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name, format), serviceCallback); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable listPublishingProfileXmlWithSecretsAsync(String resourceGroupName, String name, PublishingProfileFormat format) { + return listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name, format).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> listPublishingProfileXmlWithSecretsWithServiceResponseAsync(String resourceGroupName, String name, PublishingProfileFormat 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + CsmPublishingProfileOptions publishingProfileOptions = new CsmPublishingProfileOptions(); + publishingProfileOptions.withFormat(format); + return service.listPublishingProfileXmlWithSecrets(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), publishingProfileOptions, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listPublishingProfileXmlWithSecretsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listPublishingProfileXmlWithSecretsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void recover(String resourceGroupName, String name, SnapshotRecoveryRequestInner recoveryEntity) { + recoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).toBlocking().last().body(); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture recoverAsync(String resourceGroupName, String name, SnapshotRecoveryRequestInner recoveryEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(recoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity), serviceCallback); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable recoverAsync(String resourceGroupName, String name, SnapshotRecoveryRequestInner recoveryEntity) { + return recoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> recoverWithServiceResponseAsync(String resourceGroupName, String name, SnapshotRecoveryRequestInner 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) { + 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."); + } + 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()); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRecover(String resourceGroupName, String name, SnapshotRecoveryRequestInner recoveryEntity) { + beginRecoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).toBlocking().single().body(); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRecoverAsync(String resourceGroupName, String name, SnapshotRecoveryRequestInner recoveryEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRecoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity), serviceCallback); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRecoverAsync(String resourceGroupName, String name, SnapshotRecoveryRequestInner recoveryEntity) { + return beginRecoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRecoverWithServiceResponseAsync(String resourceGroupName, String name, SnapshotRecoveryRequestInner 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) { + 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."); + } + 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) { + try { + ServiceResponse clientResponse = beginRecoverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRecoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resetProductionSlotConfig(String resourceGroupName, String name) { + resetProductionSlotConfigWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resetProductionSlotConfigAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetProductionSlotConfigWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable resetProductionSlotConfigAsync(String resourceGroupName, String name) { + return resetProductionSlotConfigWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 (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.resetProductionSlotConfig(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 = resetProductionSlotConfigDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resetProductionSlotConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restart(String resourceGroupName, String name) { + restartWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture restartAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable restartAsync(String resourceGroupName, String name) { + return restartWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> restartWithServiceResponseAsync(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"; + 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) { + try { + ServiceResponse clientResponse = restartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restart(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) { + restartWithServiceResponseAsync(resourceGroupName, name, softRestart, synchronous).toBlocking().single().body(); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture restartAsync(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, name, softRestart, synchronous), serviceCallback); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable restartAsync(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) { + return restartWithServiceResponseAsync(resourceGroupName, name, softRestart, synchronous).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + 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.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) { + try { + ServiceResponse clientResponse = restartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse restartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteExtensionInfoInner> object if successful. + */ + public PagedList listSiteExtensions(final String resourceGroupName, final String name) { + ServiceResponse> response = listSiteExtensionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteExtensionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteExtensionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteExtensionsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteExtensionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteExtensionInfoInner> object + */ + public Observable> listSiteExtensionsAsync(final String resourceGroupName, final String name) { + return listSiteExtensionsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteExtensionInfoInner> object + */ + public Observable>> listSiteExtensionsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listSiteExtensionsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteExtensionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteExtensionInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteExtensionsSinglePageAsync(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.listSiteExtensions(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 = listSiteExtensionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteExtensionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteExtensionInfoInner object if successful. + */ + public SiteExtensionInfoInner getSiteExtension(String resourceGroupName, String name, String siteExtensionId) { + return getSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId).toBlocking().single().body(); + } + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId), serviceCallback); + } + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteExtensionInfoInner object + */ + public Observable getSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId) { + return getSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId).map(new Func1, SiteExtensionInfoInner>() { + @Override + public SiteExtensionInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteExtensionInfoInner object + */ + public Observable> getSiteExtensionWithServiceResponseAsync(String resourceGroupName, String name, String siteExtensionId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (siteExtensionId == null) { + throw new IllegalArgumentException("Parameter siteExtensionId 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.getSiteExtension(resourceGroupName, name, siteExtensionId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteExtensionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteExtensionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteExtensionInfoInner object if successful. + */ + public SiteExtensionInfoInner installSiteExtension(String resourceGroupName, String name, String siteExtensionId) { + return installSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId).toBlocking().last().body(); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture installSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(installSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId), serviceCallback); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable installSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId) { + return installSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId).map(new Func1, SiteExtensionInfoInner>() { + @Override + public SiteExtensionInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> installSiteExtensionWithServiceResponseAsync(String resourceGroupName, String name, String siteExtensionId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (siteExtensionId == null) { + throw new IllegalArgumentException("Parameter siteExtensionId 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"; + Observable> observable = service.installSiteExtension(resourceGroupName, name, siteExtensionId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteExtensionInfoInner object if successful. + */ + public SiteExtensionInfoInner beginInstallSiteExtension(String resourceGroupName, String name, String siteExtensionId) { + return beginInstallSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId).toBlocking().single().body(); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginInstallSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginInstallSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId), serviceCallback); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteExtensionInfoInner object + */ + public Observable beginInstallSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId) { + return beginInstallSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId).map(new Func1, SiteExtensionInfoInner>() { + @Override + public SiteExtensionInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteExtensionInfoInner object + */ + public Observable> beginInstallSiteExtensionWithServiceResponseAsync(String resourceGroupName, String name, String siteExtensionId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (siteExtensionId == null) { + throw new IllegalArgumentException("Parameter siteExtensionId 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.beginInstallSiteExtension(resourceGroupName, name, siteExtensionId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginInstallSiteExtensionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginInstallSiteExtensionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(429, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Remove a site extension from a web site, or a deployment slot. + * Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteSiteExtension(String resourceGroupName, String name, String siteExtensionId) { + deleteSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId).toBlocking().single().body(); + } + + /** + * Remove a site extension from a web site, or a deployment slot. + * Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId), serviceCallback); + } + + /** + * Remove a site extension from a web site, or a deployment slot. + * Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId) { + return deleteSiteExtensionWithServiceResponseAsync(resourceGroupName, name, siteExtensionId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove a site extension from a web site, or a deployment slot. + * Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteSiteExtensionWithServiceResponseAsync(String resourceGroupName, String name, String siteExtensionId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (siteExtensionId == null) { + throw new IllegalArgumentException("Parameter siteExtensionId 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.deleteSiteExtension(resourceGroupName, name, siteExtensionId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSiteExtensionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSiteExtensionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets an app's deployment slots. + * Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listSlots(final String resourceGroupName, final String name) { + ServiceResponse> response = listSlotsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets an app's deployment slots. + * Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSlotsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSlotsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets an app's deployment slots. + * Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + 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.body(); + } + }); + } + + /** + * Gets an app's deployment slots. + * Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSlotsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets an app's deployment slots. + * Gets an app's deployment slots. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.listSlots(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 = listSlotsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSlotsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of a web, mobile, or API app. + * Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + public SiteInner getSlot(String resourceGroupName, String name, String slot) { + return getSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the details of a web, mobile, or API app. + * Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the details of a web, mobile, or API app. + * Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable getSlotAsync(String resourceGroupName, String name, String slot) { + return getSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteInner>() { + @Override + public SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a web, mobile, or API app. + * Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable> getSlotWithServiceResponseAsync(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.getSlot(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 = getSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + public SiteInner createOrUpdateSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return createOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).toBlocking().last().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return createOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).map(new Func1, SiteInner>() { + @Override + public SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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."); + } + 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."); + } + 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()); + } + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + 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().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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 SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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 (siteEnvelope == null) { + throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); + } + 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()); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + public SiteInner beginCreateOrUpdateSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return beginCreateOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable beginCreateOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return beginCreateOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).map(new Func1, SiteInner>() { + @Override + public SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + 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."); + } + 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."); + } + 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) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + 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().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + 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 SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + 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 (siteEnvelope == null) { + throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteSlot(String resourceGroupName, String name, String slot) { + deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteSlotAsync(String resourceGroupName, String name, String slot) { + return deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteSlotWithServiceResponseAsync(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"; + 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) { + try { + ServiceResponse clientResponse = deleteSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify true if the App Service plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not deleted. + * @param skipDnsRegistration If true, DNS registration is skipped. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteSlot(String resourceGroupName, String name, String slot, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration) { + deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration).toBlocking().single().body(); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify true if the App Service plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not deleted. + * @param skipDnsRegistration If true, DNS registration is skipped. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteSlotAsync(String resourceGroupName, String name, String slot, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration), serviceCallback); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify true if the App Service plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not deleted. + * @param skipDnsRegistration If true, DNS registration is skipped. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify true if the App Service plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not deleted. + * @param skipDnsRegistration If true, DNS registration is skipped. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + public SiteInner updateSlot(String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope) { + return updateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateSlotAsync(String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable updateSlotAsync(String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope) { + return updateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).map(new Func1, SiteInner>() { + @Override + public SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable> updateSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SitePatchResourceInner 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 (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."); + } + 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.updateSlot(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) { + try { + ServiceResponse clientResponse = updateSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteInner object if successful. + */ + public SiteInner updateSlot(String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return updateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().single().body(); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateSlotAsync(String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable updateSlotAsync(String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return updateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).map(new Func1, SiteInner>() { + @Override + public SiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteInner object + */ + public Observable> updateSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SitePatchResourceInner 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 (siteEnvelope == null) { + throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); + } + Validator.validate(siteEnvelope); + final String apiVersion = "2016-08-01"; + return service.updateSlot(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) { + try { + ServiceResponse clientResponse = updateSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CustomHostnameAnalysisResultInner object if successful. + */ + public CustomHostnameAnalysisResultInner analyzeCustomHostnameSlot(String resourceGroupName, String name, String slot) { + return analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture analyzeCustomHostnameSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CustomHostnameAnalysisResultInner object + */ + public Observable analyzeCustomHostnameSlotAsync(String resourceGroupName, String name, String slot) { + return analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, CustomHostnameAnalysisResultInner>() { + @Override + public CustomHostnameAnalysisResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CustomHostnameAnalysisResultInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = analyzeCustomHostnameSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CustomHostnameAnalysisResultInner object if successful. + */ + public CustomHostnameAnalysisResultInner analyzeCustomHostnameSlot(String resourceGroupName, String name, String slot, String hostName) { + return analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).toBlocking().single().body(); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture analyzeCustomHostnameSlotAsync(String resourceGroupName, String name, String slot, String hostName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName), serviceCallback); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CustomHostnameAnalysisResultInner object + */ + public Observable analyzeCustomHostnameSlotAsync(String resourceGroupName, String name, String slot, String hostName) { + return analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).map(new Func1, CustomHostnameAnalysisResultInner>() { + @Override + public CustomHostnameAnalysisResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Analyze a custom hostname. + * Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CustomHostnameAnalysisResultInner object + */ + 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."); + } + 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.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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void applySlotConfigurationSlot(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + applySlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single().body(); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture applySlotConfigurationSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(applySlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity), serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable applySlotConfigurationSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + return applySlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + 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.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) { + try { + ServiceResponse clientResponse = applySlotConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse applySlotConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a backup of an app. + * Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BackupItemInner object if successful. + */ + public BackupItemInner backupSlot(String resourceGroupName, String name, String slot, BackupRequestInner request) { + return backupSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().body(); + } + + /** + * Creates a backup of an app. + * Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture backupSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(backupSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); + } + + /** + * Creates a backup of an app. + * Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + public Observable backupSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { + return backupSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).map(new Func1, BackupItemInner>() { + @Override + public BackupItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a backup of an app. + * Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = backupSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse backupSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BackupItemInner> object if successful. + */ + public PagedList listBackupsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listBackupsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBackupsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBackupsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBackupsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BackupItemInner> object + */ + 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.body(); + } + }); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBackupsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BackupItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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."); + } + 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.listBackupsSlot(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 = listBackupsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBackupsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RestoreRequestInner object if successful. + */ + public RestoreRequestInner discoverRestoreSlot(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return discoverRestoreSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().body(); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture discoverRestoreSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(discoverRestoreSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RestoreRequestInner object + */ + public Observable discoverRestoreSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return discoverRestoreSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).map(new Func1, RestoreRequestInner>() { + @Override + public RestoreRequestInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * Discovers an existing app backup that can be restored from a blob in Azure storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RestoreRequestInner object + */ + 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = discoverRestoreSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse discoverRestoreSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a backup of an app by its ID. + * Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BackupItemInner object if successful. + */ + public BackupItemInner getBackupStatusSlot(String resourceGroupName, String name, String backupId, String slot) { + return getBackupStatusSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).toBlocking().single().body(); + } + + /** + * Gets a backup of an app by its ID. + * Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getBackupStatusSlotAsync(String resourceGroupName, String name, String backupId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getBackupStatusSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot), serviceCallback); + } + + /** + * Gets a backup of an app by its ID. + * Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + public Observable getBackupStatusSlotAsync(String resourceGroupName, String name, String backupId, String slot) { + return getBackupStatusSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).map(new Func1, BackupItemInner>() { + @Override + public BackupItemInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a backup of an app by its ID. + * Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = getBackupStatusSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getBackupStatusSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a backup of an app by its ID. + * Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteBackupSlot(String resourceGroupName, String name, String backupId, String slot) { + deleteBackupSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).toBlocking().single().body(); + } + + /** + * Deletes a backup of an app by its ID. + * Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteBackupSlotAsync(String resourceGroupName, String name, String backupId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteBackupSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot), serviceCallback); + } + + /** + * Deletes a backup of an app by its ID. + * Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteBackupSlotAsync(String resourceGroupName, String name, String backupId, String slot) { + return deleteBackupSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a backup of an app by its ID. + * Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = deleteBackupSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteBackupSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, 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. + * 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 the resource group to which the resource belongs. + * @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 request Information on backup request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BackupItemInner object if successful. + */ + public BackupItemInner listBackupStatusSecretsSlot(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { + return listBackupStatusSecretsSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().single().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. + * 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 the resource group to which the resource belongs. + * @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 request Information on backup request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listBackupStatusSecretsSlotAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listBackupStatusSecretsSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request), 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. + * 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 the resource group to which the resource belongs. + * @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 request Information on backup request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + 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 BackupItemInner call(ServiceResponse response) { + return response.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. + * 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 the resource group to which the resource belongs. + * @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 request Information on backup request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupItemInner object + */ + 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = listBackupStatusSecretsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listBackupStatusSecretsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RestoreResponseInner object if successful. + */ + public RestoreResponseInner restoreSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + return restoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().last().body(); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @param request Information on restore request . + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture restoreSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request), serviceCallback); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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 RestoreResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + 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()); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RestoreResponseInner object if successful. + */ + public RestoreResponseInner beginRestoreSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + return beginRestoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().single().body(); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @param request Information on restore request . + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRestoreSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request), serviceCallback); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RestoreResponseInner object + */ + 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 RestoreResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RestoreResponseInner object + */ + 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = beginRestoreSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestoreSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteConfigResourceInner> object if successful. + */ + public PagedList listConfigurationsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listConfigurationsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listConfigurationsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listConfigurationsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listConfigurationsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listConfigurationsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigResourceInner> object + */ + public Observable> listConfigurationsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listConfigurationsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigResourceInner> object + */ + public Observable>> listConfigurationsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listConfigurationsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listConfigurationsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteConfigResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listConfigurationsSlotSinglePageAsync(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.listConfigurationsSlot(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 = listConfigurationsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Replaces the application settings of an app. + * Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings for the production slot. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StringDictionaryInner object if successful. + */ + public StringDictionaryInner updateApplicationSettingsSlot(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { + return updateApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, appSettings).toBlocking().single().body(); + } + + /** + * Replaces the application settings of an app. + * Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings for the production slot. + * @param appSettings Application settings of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, appSettings), serviceCallback); + } + + /** + * Replaces the application settings of an app. + * Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings for the production slot. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable updateApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { + return updateApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, appSettings).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Replaces the application settings of an app. + * Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings for the production slot. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + 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 (appSettings == null) { + throw new IllegalArgumentException("Parameter appSettings is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = updateApplicationSettingsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateApplicationSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the application settings of an app. + * Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StringDictionaryInner object if successful. + */ + public StringDictionaryInner listApplicationSettingsSlot(String resourceGroupName, String name, String slot) { + return listApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the application settings of an app. + * Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the application settings of an app. + * Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable listApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot) { + return listApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the application settings of an app. + * Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable> listApplicationSettingsSlotWithServiceResponseAsync(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.listApplicationSettingsSlot(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 = listApplicationSettingsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listApplicationSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteAuthSettingsInner object if successful. + */ + public SiteAuthSettingsInner updateAuthSettingsSlot(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { + return updateAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteAuthSettings).toBlocking().single().body(); + } + + /** + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAuthSettingsSlotAsync(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(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 Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteAuthSettingsInner object + */ + public Observable updateAuthSettingsSlotAsync(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { + return updateAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteAuthSettings).map(new Func1, SiteAuthSettingsInner>() { + @Override + public SiteAuthSettingsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteAuthSettingsInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = updateAuthSettingsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateAuthSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the Authentication/Authorization settings of an app. + * Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteAuthSettingsInner object if successful. + */ + public SiteAuthSettingsInner getAuthSettingsSlot(String resourceGroupName, String name, String slot) { + return getAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the Authentication/Authorization settings of an app. + * Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAuthSettingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the Authentication/Authorization settings of an app. + * Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteAuthSettingsInner object + */ + public Observable getAuthSettingsSlotAsync(String resourceGroupName, String name, String slot) { + return getAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteAuthSettingsInner>() { + @Override + public SiteAuthSettingsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Authentication/Authorization settings of an app. + * Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteAuthSettingsInner object + */ + public Observable> getAuthSettingsSlotWithServiceResponseAsync(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.getAuthSettingsSlot(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 = getAuthSettingsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAuthSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the backup configuration of an app. + * Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production slot. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BackupRequestInner object if successful. + */ + public BackupRequestInner updateBackupConfigurationSlot(String resourceGroupName, String name, String slot, BackupRequestInner request) { + return updateBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().body(); + } + + /** + * Updates the backup configuration of an app. + * Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production slot. + * @param request Edited backup configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); + } + + /** + * Updates the backup configuration of an app. + * Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production slot. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupRequestInner object + */ + public Observable updateBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { + return updateBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).map(new Func1, BackupRequestInner>() { + @Override + public BackupRequestInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the backup configuration of an app. + * Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production slot. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupRequestInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = updateBackupConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateBackupConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the backup configuration of an app. + * Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteBackupConfigurationSlot(String resourceGroupName, String name, String slot) { + deleteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Deletes the backup configuration of an app. + * Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Deletes the backup configuration of an app. + * Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return deleteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the backup configuration of an app. + * Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 (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.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 = deleteBackupConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteBackupConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the backup configuration of an app. + * Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BackupRequestInner object if successful. + */ + public BackupRequestInner getBackupConfigurationSlot(String resourceGroupName, String name, String slot) { + return getBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the backup configuration of an app. + * Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the backup configuration of an app. + * Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupRequestInner object + */ + public Observable getBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return getBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, BackupRequestInner>() { + @Override + public BackupRequestInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the backup configuration of an app. + * Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BackupRequestInner object + */ + 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 (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.getBackupConfigurationSlot(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 = getBackupConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getBackupConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Replaces the connection strings of an app. + * Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionStringDictionaryInner object if successful. + */ + public ConnectionStringDictionaryInner updateConnectionStringsSlot(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionStrings).toBlocking().single().body(); + } + + /** + * Replaces the connection strings of an app. + * Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateConnectionStringsSlotAsync(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionStrings), serviceCallback); + } + + /** + * Replaces the connection strings of an app. + * Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionStringDictionaryInner object + */ + public Observable updateConnectionStringsSlotAsync(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionStrings).map(new Func1, ConnectionStringDictionaryInner>() { + @Override + public ConnectionStringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Replaces the connection strings of an app. + * Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionStringDictionaryInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = updateConnectionStringsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateConnectionStringsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the connection strings of an app. + * Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionStringDictionaryInner object if successful. + */ + public ConnectionStringDictionaryInner listConnectionStringsSlot(String resourceGroupName, String name, String slot) { + return listConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the connection strings of an app. + * Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listConnectionStringsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the connection strings of an app. + * Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionStringDictionaryInner object + */ + public Observable listConnectionStringsSlotAsync(String resourceGroupName, String name, String slot) { + return listConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, ConnectionStringDictionaryInner>() { + @Override + public ConnectionStringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the connection strings of an app. + * Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionStringDictionaryInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = listConnectionStringsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listConnectionStringsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the logging configuration of an app. + * Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteLogsConfigInner object if successful. + */ + public SiteLogsConfigInner getDiagnosticLogsConfigurationSlot(String resourceGroupName, String name, String slot) { + return getDiagnosticLogsConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the logging configuration of an app. + * Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getDiagnosticLogsConfigurationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDiagnosticLogsConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the logging configuration of an app. + * Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteLogsConfigInner object + */ + public Observable getDiagnosticLogsConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return getDiagnosticLogsConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteLogsConfigInner>() { + @Override + public SiteLogsConfigInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the logging configuration of an app. + * Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteLogsConfigInner object + */ + public Observable> getDiagnosticLogsConfigurationSlotWithServiceResponseAsync(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.getDiagnosticLogsConfigurationSlot(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 = getDiagnosticLogsConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDiagnosticLogsConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the logging configuration of an app. + * Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteLogsConfigInner object if successful. + */ + public SiteLogsConfigInner updateDiagnosticLogsConfigSlot(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteLogsConfig).toBlocking().single().body(); + } + + /** + * Updates the logging configuration of an app. + * Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateDiagnosticLogsConfigSlotAsync(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateDiagnosticLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteLogsConfig), serviceCallback); + } + + /** + * Updates the logging configuration of an app. + * Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteLogsConfigInner object + */ + public Observable updateDiagnosticLogsConfigSlotAsync(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteLogsConfig).map(new Func1, SiteLogsConfigInner>() { + @Override + public SiteLogsConfigInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the logging configuration of an app. + * Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteLogsConfigInner object + */ + 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 (siteLogsConfig == null) { + throw new IllegalArgumentException("Parameter siteLogsConfig is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = updateDiagnosticLogsConfigSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDiagnosticLogsConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Replaces the metadata of an app. + * Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StringDictionaryInner object if successful. + */ + public StringDictionaryInner updateMetadataSlot(String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { + return updateMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot, metadata).toBlocking().single().body(); + } + + /** + * Replaces the metadata of an app. + * Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateMetadataSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner metadata, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot, metadata), serviceCallback); + } + + /** + * Replaces the metadata of an app. + * Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable updateMetadataSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { + return updateMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot, metadata).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Replaces the metadata of an app. + * Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + 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."); + } + 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."); + } + 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) { + try { + ServiceResponse clientResponse = updateMetadataSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateMetadataSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the metadata of an app. + * Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StringDictionaryInner object if successful. + */ + public StringDictionaryInner listMetadataSlot(String resourceGroupName, String name, String slot) { + return listMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the metadata of an app. + * Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listMetadataSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the metadata of an app. + * Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable listMetadataSlotAsync(String resourceGroupName, String name, String slot) { + return listMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the metadata of an app. + * Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = listMetadataSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listMetadataSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the UserInner object if successful. + */ + public UserInner listPublishingCredentialsSlot(String resourceGroupName, String name, String slot) { + return listPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().last().body(); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot) { + return listPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, UserInner>() { + @Override + public UserInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listPublishingCredentialsSlotWithServiceResponseAsync(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"; + 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()); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the UserInner object if successful. + */ + public UserInner beginListPublishingCredentialsSlot(String resourceGroupName, String name, String slot) { + return beginListPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginListPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the UserInner object + */ + public Observable beginListPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot) { + return beginListPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, UserInner>() { + @Override + public UserInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the UserInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = beginListPublishingCredentialsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListPublishingCredentialsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PushSettingsInner object if successful. + */ + public PushSettingsInner updateSitePushSettingsSlot(String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { + return updateSitePushSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, pushSettings).toBlocking().single().body(); + } + + /** + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSitePushSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, pushSettings), serviceCallback); + } + + /** + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PushSettingsInner object + */ + public Observable updateSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { + return updateSitePushSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, pushSettings).map(new Func1, PushSettingsInner>() { + @Override + public PushSettingsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PushSettingsInner object + */ + 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."); + } + 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 (pushSettings == null) { + throw new IllegalArgumentException("Parameter pushSettings is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = updateSitePushSettingsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateSitePushSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PushSettingsInner object if successful. + */ + public PushSettingsInner listSitePushSettingsSlot(String resourceGroupName, String name, String slot) { + return listSitePushSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listSitePushSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PushSettingsInner object + */ + 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.body(); + } + }); + } + + /** + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PushSettingsInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = listSitePushSettingsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSitePushSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteConfigResourceInner object if successful. + */ + public SiteConfigResourceInner getConfigurationSlot(String resourceGroupName, String name, String slot) { + return getConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getConfigurationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable getConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return getConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteConfigResourceInner>() { + @Override + public SiteConfigResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable> getConfigurationSlotWithServiceResponseAsync(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.getConfigurationSlot(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 = getConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteConfigResourceInner object if successful. + */ + public SiteConfigResourceInner createOrUpdateConfigurationSlot(String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + return createOrUpdateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).toBlocking().single().body(); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig), serviceCallback); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable createOrUpdateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + return createOrUpdateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).map(new Func1, SiteConfigResourceInner>() { + @Override + public SiteConfigResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable> createOrUpdateConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteConfigResourceInner 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 (siteConfig == null) { + throw new IllegalArgumentException("Parameter siteConfig is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = createOrUpdateConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteConfigResourceInner object if successful. + */ + public SiteConfigResourceInner updateConfigurationSlot(String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + return updateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).toBlocking().single().body(); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig), serviceCallback); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable updateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + return updateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).map(new Func1, SiteConfigResourceInner>() { + @Override + public SiteConfigResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the configuration of an app. + * Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable> updateConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteConfigResourceInner 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 (siteConfig == null) { + throw new IllegalArgumentException("Parameter siteConfig is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = updateConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteConfigurationSnapshotInfoInner> object if successful. + */ + public PagedList listConfigurationSnapshotInfoSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listConfigurationSnapshotInfoSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listConfigurationSnapshotInfoSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listConfigurationSnapshotInfoSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listConfigurationSnapshotInfoSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listConfigurationSnapshotInfoSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigurationSnapshotInfoInner> object + */ + public Observable> listConfigurationSnapshotInfoSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listConfigurationSnapshotInfoSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigurationSnapshotInfoInner> object + */ + public Observable>> listConfigurationSnapshotInfoSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listConfigurationSnapshotInfoSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listConfigurationSnapshotInfoSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteConfigurationSnapshotInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listConfigurationSnapshotInfoSlotSinglePageAsync(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.listConfigurationSnapshotInfoSlot(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 = listConfigurationSnapshotInfoSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationSnapshotInfoSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteConfigResourceInner object if successful. + */ + public SiteConfigResourceInner getConfigurationSnapshotSlot(String resourceGroupName, String name, String snapshotId, String slot) { + return getConfigurationSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, snapshotId, slot).toBlocking().single().body(); + } + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getConfigurationSnapshotSlotAsync(String resourceGroupName, String name, String snapshotId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getConfigurationSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, snapshotId, slot), serviceCallback); + } + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable getConfigurationSnapshotSlotAsync(String resourceGroupName, String name, String snapshotId, String slot) { + return getConfigurationSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, snapshotId, slot).map(new Func1, SiteConfigResourceInner>() { + @Override + public SiteConfigResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteConfigResourceInner object + */ + public Observable> getConfigurationSnapshotSlotWithServiceResponseAsync(String resourceGroupName, String name, String snapshotId, 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 (snapshotId == null) { + throw new IllegalArgumentException("Parameter snapshotId 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.getConfigurationSnapshotSlot(resourceGroupName, name, snapshotId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getConfigurationSnapshotSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getConfigurationSnapshotSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reverts the configuration of an app to a previous snapshot. + * Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void recoverSiteConfigurationSnapshotSlot(String resourceGroupName, String name, String snapshotId, String slot) { + recoverSiteConfigurationSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, snapshotId, slot).toBlocking().single().body(); + } + + /** + * Reverts the configuration of an app to a previous snapshot. + * Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture recoverSiteConfigurationSnapshotSlotAsync(String resourceGroupName, String name, String snapshotId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(recoverSiteConfigurationSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, snapshotId, slot), serviceCallback); + } + + /** + * Reverts the configuration of an app to a previous snapshot. + * Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable recoverSiteConfigurationSnapshotSlotAsync(String resourceGroupName, String name, String snapshotId, String slot) { + return recoverSiteConfigurationSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, snapshotId, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reverts the configuration of an app to a previous snapshot. + * Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> recoverSiteConfigurationSnapshotSlotWithServiceResponseAsync(String resourceGroupName, String name, String snapshotId, 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 (snapshotId == null) { + throw new IllegalArgumentException("Parameter snapshotId 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.recoverSiteConfigurationSnapshotSlot(resourceGroupName, name, snapshotId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = recoverSiteConfigurationSnapshotSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse recoverSiteConfigurationSnapshotSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the last lines of docker logs for the given site. + * Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream getWebSiteContainerLogsSlot(String resourceGroupName, String name, String slot) { + return getWebSiteContainerLogsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the last lines of docker logs for the given site. + * Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getWebSiteContainerLogsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWebSiteContainerLogsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the last lines of docker logs for the given site. + * Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable getWebSiteContainerLogsSlotAsync(String resourceGroupName, String name, String slot) { + return getWebSiteContainerLogsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the last lines of docker logs for the given site. + * Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> getWebSiteContainerLogsSlotWithServiceResponseAsync(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.getWebSiteContainerLogsSlot(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 = getWebSiteContainerLogsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getWebSiteContainerLogsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream getWebSiteContainerLogsZipSlot(String resourceGroupName, String name, String slot) { + return getWebSiteContainerLogsZipSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getWebSiteContainerLogsZipSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWebSiteContainerLogsZipSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable getWebSiteContainerLogsZipSlotAsync(String resourceGroupName, String name, String slot) { + return getWebSiteContainerLogsZipSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> getWebSiteContainerLogsZipSlotWithServiceResponseAsync(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.getWebSiteContainerLogsZipSlot(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 = getWebSiteContainerLogsZipSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getWebSiteContainerLogsZipSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContinuousWebJobInner> object if successful. + */ + public PagedList listContinuousWebJobsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listContinuousWebJobsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listContinuousWebJobsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listContinuousWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listContinuousWebJobsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listContinuousWebJobsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContinuousWebJobInner> object + */ + public Observable> listContinuousWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listContinuousWebJobsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContinuousWebJobInner> object + */ + public Observable>> listContinuousWebJobsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listContinuousWebJobsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listContinuousWebJobsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContinuousWebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listContinuousWebJobsSlotSinglePageAsync(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.listContinuousWebJobsSlot(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 = listContinuousWebJobsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listContinuousWebJobsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ContinuousWebJobInner object if successful. + */ + public ContinuousWebJobInner getContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + return getContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).toBlocking().single().body(); + } + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot), serviceCallback); + } + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContinuousWebJobInner object + */ + public Observable getContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + return getContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).map(new Func1, ContinuousWebJobInner>() { + @Override + public ContinuousWebJobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContinuousWebJobInner object + */ + public Observable> getContinuousWebJobSlotWithServiceResponseAsync(String resourceGroupName, String name, String webJobName, 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 (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.getContinuousWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getContinuousWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getContinuousWebJobSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + deleteContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).toBlocking().single().body(); + } + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot), serviceCallback); + } + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + return deleteContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteContinuousWebJobSlotWithServiceResponseAsync(String resourceGroupName, String name, String webJobName, 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 (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.deleteContinuousWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteContinuousWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteContinuousWebJobSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Start a continuous web job for an app, or a deployment slot. + * Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void startContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + startContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).toBlocking().single().body(); + } + + /** + * Start a continuous web job for an app, or a deployment slot. + * Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot), serviceCallback); + } + + /** + * Start a continuous web job for an app, or a deployment slot. + * Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable startContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + return startContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start a continuous web job for an app, or a deployment slot. + * Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> startContinuousWebJobSlotWithServiceResponseAsync(String resourceGroupName, String name, String webJobName, 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 (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.startContinuousWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startContinuousWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse startContinuousWebJobSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stopContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + stopContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).toBlocking().single().body(); + } + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture stopContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot), serviceCallback); + } + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable stopContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + return stopContinuousWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> stopContinuousWebJobSlotWithServiceResponseAsync(String resourceGroupName, String name, String webJobName, 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 (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.stopContinuousWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopContinuousWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopContinuousWebJobSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DeploymentInner> object if successful. + */ + public PagedList listDeploymentsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDeploymentsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDeploymentsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentInner> object + */ + 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.body(); + } + }); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDeploymentsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.listDeploymentsSlot(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 = listDeploymentsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDeploymentsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DeploymentInner object if successful. + */ + public DeploymentInner getDeploymentSlot(String resourceGroupName, String name, String id, String slot) { + return getDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).toBlocking().single().body(); + } + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot), serviceCallback); + } + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentInner 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.body(); + } + }); + } + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = getDeploymentSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create a deployment for an app, or a deployment slot. + * Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the production slot. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the 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().body(); + } + + /** + * Create a deployment for an app, or a deployment slot. + * Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the production slot. + * @param deployment Deployment details. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, DeploymentInner deployment, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, deployment), serviceCallback); + } + + /** + * Create a deployment for an app, or a deployment slot. + * Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the production slot. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the 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.body(); + } + }); + } + + /** + * Create a deployment for an app, or a deployment slot. + * Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the production slot. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentInner object + */ + 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 (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 (deployment == null) { + throw new IllegalArgumentException("Parameter deployment is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = createDeploymentSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteDeploymentSlot(String resourceGroupName, String name, String id, String slot) { + deleteDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).toBlocking().single().body(); + } + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot), serviceCallback); + } + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot) { + return deleteDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = deleteDeploymentSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DeploymentInner object if successful. + */ + public DeploymentInner listDeploymentLogSlot(String resourceGroupName, String name, String id, String slot) { + return listDeploymentLogSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).toBlocking().single().body(); + } + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listDeploymentLogSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listDeploymentLogSlotWithServiceResponseAsync(resourceGroupName, name, id, slot), serviceCallback); + } + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentInner object + */ + public Observable listDeploymentLogSlotAsync(String resourceGroupName, String name, String id, String slot) { + return listDeploymentLogSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).map(new Func1, DeploymentInner>() { + @Override + public DeploymentInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentInner object + */ + public Observable> listDeploymentLogSlotWithServiceResponseAsync(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 (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."); + } + final String apiVersion = "2016-08-01"; + return service.listDeploymentLogSlot(resourceGroupName, name, id, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDeploymentLogSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDeploymentLogSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IdentifierInner> object if successful. + */ + public PagedList listDomainOwnershipIdentifiersSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listDomainOwnershipIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDomainOwnershipIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDomainOwnershipIdentifiersSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDomainOwnershipIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDomainOwnershipIdentifiersSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable> listDomainOwnershipIdentifiersSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listDomainOwnershipIdentifiersSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable>> listDomainOwnershipIdentifiersSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listDomainOwnershipIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDomainOwnershipIdentifiersSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IdentifierInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDomainOwnershipIdentifiersSlotSinglePageAsync(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.listDomainOwnershipIdentifiersSlot(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 = listDomainOwnershipIdentifiersSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDomainOwnershipIdentifiersSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get domain ownership identifier for web app. + * Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IdentifierInner object if successful. + */ + public IdentifierInner getDomainOwnershipIdentifierSlot(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + return getDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot).toBlocking().single().body(); + } + + /** + * Get domain ownership identifier for web app. + * Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot), serviceCallback); + } + + /** + * Get domain ownership identifier for web app. + * Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable getDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + return getDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot).map(new Func1, IdentifierInner>() { + @Override + public IdentifierInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get domain ownership identifier for web app. + * Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable> getDomainOwnershipIdentifierSlotWithServiceResponseAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, 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 (domainOwnershipIdentifierName == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifierName 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.getDomainOwnershipIdentifierSlot(resourceGroupName, name, domainOwnershipIdentifierName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDomainOwnershipIdentifierSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDomainOwnershipIdentifierSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IdentifierInner object if successful. + */ + public IdentifierInner createOrUpdateDomainOwnershipIdentifierSlot(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier) { + return createOrUpdateDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier).toBlocking().single().body(); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier), serviceCallback); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable createOrUpdateDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier) { + return createOrUpdateDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier).map(new Func1, IdentifierInner>() { + @Override + public IdentifierInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable> createOrUpdateDomainOwnershipIdentifierSlotWithServiceResponseAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (domainOwnershipIdentifierName == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifierName 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 (domainOwnershipIdentifier == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifier is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateDomainOwnershipIdentifierSlot(resourceGroupName, name, domainOwnershipIdentifierName, slot, this.client.subscriptionId(), domainOwnershipIdentifier, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDomainOwnershipIdentifierSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDomainOwnershipIdentifierSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a domain ownership identifier for a web app. + * Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteDomainOwnershipIdentifierSlot(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + deleteDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot).toBlocking().single().body(); + } + + /** + * Deletes a domain ownership identifier for a web app. + * Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot), serviceCallback); + } + + /** + * Deletes a domain ownership identifier for a web app. + * Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + return deleteDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a domain ownership identifier for a web app. + * Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteDomainOwnershipIdentifierSlotWithServiceResponseAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, 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 (domainOwnershipIdentifierName == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifierName 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.deleteDomainOwnershipIdentifierSlot(resourceGroupName, name, domainOwnershipIdentifierName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDomainOwnershipIdentifierSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDomainOwnershipIdentifierSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IdentifierInner object if successful. + */ + public IdentifierInner updateDomainOwnershipIdentifierSlot(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier) { + return updateDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier).toBlocking().single().body(); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier), serviceCallback); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable updateDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier) { + return updateDomainOwnershipIdentifierSlotWithServiceResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier).map(new Func1, IdentifierInner>() { + @Override + public IdentifierInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IdentifierInner object + */ + public Observable> updateDomainOwnershipIdentifierSlotWithServiceResponseAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (domainOwnershipIdentifierName == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifierName 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 (domainOwnershipIdentifier == null) { + throw new IllegalArgumentException("Parameter domainOwnershipIdentifier is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + final String apiVersion = "2016-08-01"; + return service.updateDomainOwnershipIdentifierSlot(resourceGroupName, name, domainOwnershipIdentifierName, slot, this.client.subscriptionId(), domainOwnershipIdentifier, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDomainOwnershipIdentifierSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDomainOwnershipIdentifierSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner getMSDeployStatusSlot(String resourceGroupName, String name, String slot) { + return getMSDeployStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMSDeployStatusSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMSDeployStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable getMSDeployStatusSlotAsync(String resourceGroupName, String name, String slot) { + return getMSDeployStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable> getMSDeployStatusSlotWithServiceResponseAsync(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.getMSDeployStatusSlot(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 = getMSDeployStatusSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMSDeployStatusSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner createMSDeployOperationSlot(String resourceGroupName, String name, String slot, MSDeployInner mSDeploy) { + return createMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, mSDeploy).toBlocking().last().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, MSDeployInner mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, MSDeployInner mSDeploy) { + return createMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, mSDeploy).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createMSDeployOperationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, MSDeployInner mSDeploy) { + if (resourceGroupName == null) { + throw new 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 (mSDeploy == null) { + throw new IllegalArgumentException("Parameter mSDeploy is required and cannot be null."); + } + Validator.validate(mSDeploy); + final String apiVersion = "2016-08-01"; + Observable> observable = service.createMSDeployOperationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), mSDeploy, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner beginCreateMSDeployOperationSlot(String resourceGroupName, String name, String slot, MSDeployInner mSDeploy) { + return beginCreateMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, mSDeploy).toBlocking().single().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, MSDeployInner mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable beginCreateMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, MSDeployInner mSDeploy) { + return beginCreateMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, mSDeploy).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable> beginCreateMSDeployOperationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, MSDeployInner mSDeploy) { + if (resourceGroupName == null) { + throw new 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 (mSDeploy == null) { + throw new IllegalArgumentException("Parameter mSDeploy is required and cannot be null."); + } + Validator.validate(mSDeploy); + final String apiVersion = "2016-08-01"; + return service.beginCreateMSDeployOperationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), mSDeploy, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateMSDeployOperationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateMSDeployOperationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployLogInner object if successful. + */ + public MSDeployLogInner getMSDeployLogSlot(String resourceGroupName, String name, String slot) { + return getMSDeployLogSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMSDeployLogSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMSDeployLogSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployLogInner object + */ + public Observable getMSDeployLogSlotAsync(String resourceGroupName, String name, String slot) { + return getMSDeployLogSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, MSDeployLogInner>() { + @Override + public MSDeployLogInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployLogInner object + */ + public Observable> getMSDeployLogSlotWithServiceResponseAsync(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.getMSDeployLogSlot(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 = getMSDeployLogSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMSDeployLogSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<FunctionEnvelopeInner> object if successful. + */ + public PagedList listInstanceFunctionsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listInstanceFunctionsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceFunctionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceFunctionsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceFunctionsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceFunctionsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FunctionEnvelopeInner> object + */ + public Observable> listInstanceFunctionsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listInstanceFunctionsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FunctionEnvelopeInner> object + */ + public Observable>> listInstanceFunctionsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listInstanceFunctionsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceFunctionsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FunctionEnvelopeInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceFunctionsSlotSinglePageAsync(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.listInstanceFunctionsSlot(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 = listInstanceFunctionsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceFunctionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String getFunctionsAdminTokenSlot(String resourceGroupName, String name, String slot) { + return getFunctionsAdminTokenSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getFunctionsAdminTokenSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFunctionsAdminTokenSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable getFunctionsAdminTokenSlotAsync(String resourceGroupName, String name, String slot) { + return getFunctionsAdminTokenSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> getFunctionsAdminTokenSlotWithServiceResponseAsync(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.getFunctionsAdminTokenSlot(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 = getFunctionsAdminTokenSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFunctionsAdminTokenSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get function information by its ID for web site, or a deployment slot. + * Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FunctionEnvelopeInner object if successful. + */ + public FunctionEnvelopeInner getInstanceFunctionSlot(String resourceGroupName, String name, String functionName, String slot) { + return getInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot).toBlocking().single().body(); + } + + /** + * Get function information by its ID for web site, or a deployment slot. + * Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot), serviceCallback); + } + + /** + * Get function information by its ID for web site, or a deployment slot. + * Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionEnvelopeInner object + */ + public Observable getInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot) { + return getInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot).map(new Func1, FunctionEnvelopeInner>() { + @Override + public FunctionEnvelopeInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get function information by its ID for web site, or a deployment slot. + * Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionEnvelopeInner object + */ + public Observable> getInstanceFunctionSlotWithServiceResponseAsync(String resourceGroupName, String name, String functionName, 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 (functionName == null) { + throw new IllegalArgumentException("Parameter functionName 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.getInstanceFunctionSlot(resourceGroupName, name, functionName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceFunctionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceFunctionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FunctionEnvelopeInner object if successful. + */ + public FunctionEnvelopeInner createInstanceFunctionSlot(String resourceGroupName, String name, String functionName, String slot, FunctionEnvelopeInner functionEnvelope) { + return createInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot, functionEnvelope).toBlocking().last().body(); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param functionEnvelope Function details. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot, FunctionEnvelopeInner functionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot, functionEnvelope), serviceCallback); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot, FunctionEnvelopeInner functionEnvelope) { + return createInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot, functionEnvelope).map(new Func1, FunctionEnvelopeInner>() { + @Override + public FunctionEnvelopeInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createInstanceFunctionSlotWithServiceResponseAsync(String resourceGroupName, String name, String functionName, String slot, FunctionEnvelopeInner functionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (functionName == null) { + throw new IllegalArgumentException("Parameter functionName 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 (functionEnvelope == null) { + throw new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null."); + } + Validator.validate(functionEnvelope); + final String apiVersion = "2016-08-01"; + Observable> observable = service.createInstanceFunctionSlot(resourceGroupName, name, functionName, slot, this.client.subscriptionId(), functionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FunctionEnvelopeInner object if successful. + */ + public FunctionEnvelopeInner beginCreateInstanceFunctionSlot(String resourceGroupName, String name, String functionName, String slot, FunctionEnvelopeInner functionEnvelope) { + return beginCreateInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot, functionEnvelope).toBlocking().single().body(); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param functionEnvelope Function details. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot, FunctionEnvelopeInner functionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot, functionEnvelope), serviceCallback); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionEnvelopeInner object + */ + public Observable beginCreateInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot, FunctionEnvelopeInner functionEnvelope) { + return beginCreateInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot, functionEnvelope).map(new Func1, FunctionEnvelopeInner>() { + @Override + public FunctionEnvelopeInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create function for web site, or a deployment slot. + * Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionEnvelopeInner object + */ + public Observable> beginCreateInstanceFunctionSlotWithServiceResponseAsync(String resourceGroupName, String name, String functionName, String slot, FunctionEnvelopeInner functionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (functionName == null) { + throw new IllegalArgumentException("Parameter functionName 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 (functionEnvelope == null) { + throw new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null."); + } + Validator.validate(functionEnvelope); + final String apiVersion = "2016-08-01"; + return service.beginCreateInstanceFunctionSlot(resourceGroupName, name, functionName, slot, this.client.subscriptionId(), functionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateInstanceFunctionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateInstanceFunctionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a function for web site, or a deployment slot. + * Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteInstanceFunctionSlot(String resourceGroupName, String name, String functionName, String slot) { + deleteInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot).toBlocking().single().body(); + } + + /** + * Delete a function for web site, or a deployment slot. + * Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot), serviceCallback); + } + + /** + * Delete a function for web site, or a deployment slot. + * Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot) { + return deleteInstanceFunctionSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a function for web site, or a deployment slot. + * Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteInstanceFunctionSlotWithServiceResponseAsync(String resourceGroupName, String name, String functionName, 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 (functionName == null) { + throw new IllegalArgumentException("Parameter functionName 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.deleteInstanceFunctionSlot(resourceGroupName, name, functionName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteInstanceFunctionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteInstanceFunctionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FunctionSecretsInner object if successful. + */ + public FunctionSecretsInner listFunctionSecretsSlot(String resourceGroupName, String name, String functionName, String slot) { + return listFunctionSecretsSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot).toBlocking().single().body(); + } + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listFunctionSecretsSlotAsync(String resourceGroupName, String name, String functionName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listFunctionSecretsSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot), serviceCallback); + } + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionSecretsInner object + */ + public Observable listFunctionSecretsSlotAsync(String resourceGroupName, String name, String functionName, String slot) { + return listFunctionSecretsSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot).map(new Func1, FunctionSecretsInner>() { + @Override + public FunctionSecretsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionSecretsInner object + */ + public Observable> listFunctionSecretsSlotWithServiceResponseAsync(String resourceGroupName, String name, String functionName, 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 (functionName == null) { + throw new IllegalArgumentException("Parameter functionName 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.listFunctionSecretsSlot(resourceGroupName, name, functionName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listFunctionSecretsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listFunctionSecretsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<HostNameBindingInner> object if successful. + */ + public PagedList listHostNameBindingsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listHostNameBindingsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listHostNameBindingsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHostNameBindingsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHostNameBindingsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HostNameBindingInner> object + */ + 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.body(); + } + }); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHostNameBindingsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHostNameBindingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HostNameBindingInner object if successful. + */ + public HostNameBindingInner getHostNameBindingSlot(String resourceGroupName, String name, String slot, String hostName) { + return getHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).toBlocking().single().body(); + } + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. + * @param hostName Hostname in the hostname binding. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName), serviceCallback); + } + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HostNameBindingInner object + */ + public Observable getHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName) { + return getHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).map(new Func1, HostNameBindingInner>() { + @Override + public HostNameBindingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HostNameBindingInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = getHostNameBindingSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHostNameBindingSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. + * @param hostNameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HostNameBindingInner object if successful. + */ + public HostNameBindingInner createOrUpdateHostNameBindingSlot(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding) { + return createOrUpdateHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, hostName, slot, hostNameBinding).toBlocking().single().body(); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. + * @param hostNameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateHostNameBindingSlotAsync(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, hostName, slot, hostNameBinding), serviceCallback); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. + * @param hostNameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HostNameBindingInner object + */ + 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 HostNameBindingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostName Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. + * @param hostNameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HostNameBindingInner object + */ + 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 (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."); + } + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteHostNameBindingSlot(String resourceGroupName, String name, String slot, String hostName) { + deleteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).toBlocking().single().body(); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param hostName Hostname in the hostname binding. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName), serviceCallback); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName) { + return deleteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param hostName Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = deleteHostNameBindingSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteHostNameBindingSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionInner object if successful. + */ + public HybridConnectionInner getHybridConnectionSlot(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return getHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot).toBlocking().single().body(); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot), serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = getHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHybridConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionInner object if successful. + */ + 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().body(); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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.body(); + } + }); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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 (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 (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = createOrUpdateHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateHybridConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteHybridConnectionSlot(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + deleteHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot).toBlocking().single().body(); + } + + /** + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot), serviceCallback); + } + + /** + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return deleteHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = deleteHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteHybridConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionInner object if successful. + */ + 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().body(); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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.body(); + } + }); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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 (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = updateHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateHybridConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionKeyInner object if successful. + */ + public HybridConnectionKeyInner listHybridConnectionKeysSlot(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return listHybridConnectionKeysSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot).toBlocking().single().body(); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listHybridConnectionKeysSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listHybridConnectionKeysSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot), serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionKeyInner object + */ + public Observable listHybridConnectionKeysSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return listHybridConnectionKeysSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot).map(new Func1, HybridConnectionKeyInner>() { + @Override + public HybridConnectionKeyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionKeyInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = listHybridConnectionKeysSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listHybridConnectionKeysSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HybridConnectionInner object if successful. + */ + public HybridConnectionInner listHybridConnectionsSlot(String resourceGroupName, String name, String slot) { + return listHybridConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * 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 the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listHybridConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listHybridConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HybridConnectionInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = listHybridConnectionsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listHybridConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RelayServiceConnectionEntityInner object if successful. + */ + public RelayServiceConnectionEntityInner listRelayServiceConnectionsSlot(String resourceGroupName, String name, String slot) { + return listRelayServiceConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listRelayServiceConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listRelayServiceConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + 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.body(); + } + }); + } + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + public Observable> listRelayServiceConnectionsSlotWithServiceResponseAsync(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.listRelayServiceConnectionsSlot(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 = listRelayServiceConnectionsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listRelayServiceConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a hybrid connection configuration by its name. + * Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RelayServiceConnectionEntityInner object if successful. + */ + public RelayServiceConnectionEntityInner getRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot) { + return getRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).toBlocking().single().body(); + } + + /** + * Gets a hybrid connection configuration by its name. + * Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot), serviceCallback); + } + + /** + * Gets a hybrid connection configuration by its name. + * Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + 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.body(); + } + }); + } + + /** + * Gets a hybrid connection configuration by its name. + * Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = getRelayServiceConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RelayServiceConnectionEntityInner object if successful. + */ + public RelayServiceConnectionEntityInner createOrUpdateRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { + return createOrUpdateRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + 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.body(); + } + }); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + 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 (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = createOrUpdateRelayServiceConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a relay service connection by its name. + * Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot) { + deleteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).toBlocking().single().body(); + } + + /** + * Deletes a relay service connection by its name. + * Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot), serviceCallback); + } + + /** + * Deletes a relay service connection by its name. + * Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot) { + return deleteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a relay service connection by its name. + * Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = deleteRelayServiceConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RelayServiceConnectionEntityInner object if successful. + */ + public RelayServiceConnectionEntityInner updateRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { + return updateRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + 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 RelayServiceConnectionEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RelayServiceConnectionEntityInner object + */ + 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 (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = updateRelayServiceConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInstanceInner> object if successful. + */ + public PagedList listInstanceIdentifiersSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listInstanceIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceIdentifiersSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInstanceInner> object + */ + 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.body(); + } + }); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceIdentifiersSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInstanceInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse> result = listInstanceIdentifiersSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceIdentifiersSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner getInstanceMsDeployStatusSlot(String resourceGroupName, String name, String slot, String instanceId) { + return getInstanceMsDeployStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId).toBlocking().single().body(); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceMsDeployStatusSlotAsync(String resourceGroupName, String name, String slot, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceMsDeployStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId), serviceCallback); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable getInstanceMsDeployStatusSlotAsync(String resourceGroupName, String name, String slot, String instanceId) { + return getInstanceMsDeployStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the status of the last MSDeploy operation. + * Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable> getInstanceMsDeployStatusSlotWithServiceResponseAsync(String resourceGroupName, String name, 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 (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.getInstanceMsDeployStatusSlot(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 clientResponse = getInstanceMsDeployStatusSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceMsDeployStatusSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner createInstanceMSDeployOperationSlot(String resourceGroupName, String name, String slot, String instanceId, MSDeployInner mSDeploy) { + return createInstanceMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy).toBlocking().last().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 mSDeploy Details of MSDeploy operation + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createInstanceMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, String instanceId, MSDeployInner mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createInstanceMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createInstanceMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, String instanceId, MSDeployInner mSDeploy) { + return createInstanceMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createInstanceMSDeployOperationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String instanceId, MSDeployInner mSDeploy) { + if (resourceGroupName == null) { + throw new 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."); + } + if (mSDeploy == null) { + throw new IllegalArgumentException("Parameter mSDeploy is required and cannot be null."); + } + Validator.validate(mSDeploy); + final String apiVersion = "2016-08-01"; + Observable> observable = service.createInstanceMSDeployOperationSlot(resourceGroupName, name, slot, instanceId, this.client.subscriptionId(), mSDeploy, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployStatusInner object if successful. + */ + public MSDeployStatusInner beginCreateInstanceMSDeployOperationSlot(String resourceGroupName, String name, String slot, String instanceId, MSDeployInner mSDeploy) { + return beginCreateInstanceMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy).toBlocking().single().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 mSDeploy Details of MSDeploy operation + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateInstanceMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, String instanceId, MSDeployInner mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateInstanceMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable beginCreateInstanceMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, String instanceId, MSDeployInner mSDeploy) { + return beginCreateInstanceMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy).map(new Func1, MSDeployStatusInner>() { + @Override + public MSDeployStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Invoke the MSDeploy web app extension. + * Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 mSDeploy Details of MSDeploy operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployStatusInner object + */ + public Observable> beginCreateInstanceMSDeployOperationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String instanceId, MSDeployInner mSDeploy) { + if (resourceGroupName == null) { + throw new 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."); + } + if (mSDeploy == null) { + throw new IllegalArgumentException("Parameter mSDeploy is required and cannot be null."); + } + Validator.validate(mSDeploy); + final String apiVersion = "2016-08-01"; + return service.beginCreateInstanceMSDeployOperationSlot(resourceGroupName, name, slot, instanceId, this.client.subscriptionId(), mSDeploy, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateInstanceMSDeployOperationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateInstanceMSDeployOperationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MSDeployLogInner object if successful. + */ + public MSDeployLogInner getInstanceMSDeployLogSlot(String resourceGroupName, String name, String slot, String instanceId) { + return getInstanceMSDeployLogSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId).toBlocking().single().body(); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceMSDeployLogSlotAsync(String resourceGroupName, String name, String slot, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceMSDeployLogSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId), serviceCallback); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployLogInner object + */ + public Observable getInstanceMSDeployLogSlotAsync(String resourceGroupName, String name, String slot, String instanceId) { + return getInstanceMSDeployLogSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId).map(new Func1, MSDeployLogInner>() { + @Override + public MSDeployLogInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MSDeployLogInner object + */ + public Observable> getInstanceMSDeployLogSlotWithServiceResponseAsync(String resourceGroupName, String name, 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 (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.getInstanceMSDeployLogSlot(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 clientResponse = getInstanceMSDeployLogSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceMSDeployLogSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessInfoInner> object if successful. + */ + public PagedList listInstanceProcessesSlot(final String resourceGroupName, final String name, final String slot, final String instanceId) { + ServiceResponse> response = listInstanceProcessesSlotSinglePageAsync(resourceGroupName, name, slot, instanceId).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessesSlotAsync(final String resourceGroupName, final String name, final String slot, final String instanceId, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessesSlotSinglePageAsync(resourceGroupName, name, slot, instanceId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable> listInstanceProcessesSlotAsync(final String resourceGroupName, final String name, final String slot, final String instanceId) { + return listInstanceProcessesSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable>> listInstanceProcessesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot, final String instanceId) { + return listInstanceProcessesSlotSinglePageAsync(resourceGroupName, name, slot, instanceId) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + ServiceResponse> * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessesSlotSinglePageAsync(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.listInstanceProcessesSlot(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 = listInstanceProcessesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessInfoInner object if successful. + */ + public ProcessInfoInner getInstanceProcessSlot(String resourceGroupName, String name, String processId, String slot, String instanceId) { + return getInstanceProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot, instanceId).toBlocking().single().body(); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceProcessSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot, instanceId), serviceCallback); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessInfoInner object + */ + public Observable getInstanceProcessSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId) { + return getInstanceProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot, instanceId).map(new Func1, ProcessInfoInner>() { + @Override + public ProcessInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessInfoInner object + */ + public Observable> getInstanceProcessSlotWithServiceResponseAsync(String resourceGroupName, String name, String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.getInstanceProcessSlot(resourceGroupName, name, processId, 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 = getInstanceProcessSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteInstanceProcessSlot(String resourceGroupName, String name, String processId, String slot, String instanceId) { + deleteInstanceProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot, instanceId).toBlocking().single().body(); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteInstanceProcessSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteInstanceProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot, instanceId), serviceCallback); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteInstanceProcessSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId) { + return deleteInstanceProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot, instanceId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteInstanceProcessSlotWithServiceResponseAsync(String resourceGroupName, String name, String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.deleteInstanceProcessSlot(resourceGroupName, name, processId, 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 = deleteInstanceProcessSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteInstanceProcessSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream getInstanceProcessDumpSlot(String resourceGroupName, String name, String processId, String slot, String instanceId) { + return getInstanceProcessDumpSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot, instanceId).toBlocking().single().body(); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceProcessDumpSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceProcessDumpSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot, instanceId), serviceCallback); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable getInstanceProcessDumpSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId) { + return getInstanceProcessDumpSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot, instanceId).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> getInstanceProcessDumpSlotWithServiceResponseAsync(String resourceGroupName, String name, String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.getInstanceProcessDumpSlot(resourceGroupName, name, processId, 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 = getInstanceProcessDumpSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessDumpSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessModuleInfoInner> object if successful. + */ + public PagedList listInstanceProcessModulesSlot(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId) { + ServiceResponse> response = listInstanceProcessModulesSlotSinglePageAsync(resourceGroupName, name, processId, slot, instanceId).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessModulesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessModulesSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessModulesSlotSinglePageAsync(resourceGroupName, name, processId, slot, instanceId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessModulesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable> listInstanceProcessModulesSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId) { + return listInstanceProcessModulesSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot, instanceId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable>> listInstanceProcessModulesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId) { + return listInstanceProcessModulesSlotSinglePageAsync(resourceGroupName, name, processId, slot, instanceId) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessModulesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param processId PID. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + ServiceResponse> * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessModuleInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessModulesSlotSinglePageAsync(final String resourceGroupName, final String name, final String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.listInstanceProcessModulesSlot(resourceGroupName, name, processId, 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 = listInstanceProcessModulesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessModulesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessModuleInfoInner object if successful. + */ + public ProcessModuleInfoInner getInstanceProcessModuleSlot(String resourceGroupName, String name, String processId, String baseAddress, String slot, String instanceId) { + return getInstanceProcessModuleSlotWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress, slot, instanceId).toBlocking().single().body(); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceProcessModuleSlotAsync(String resourceGroupName, String name, String processId, String baseAddress, String slot, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceProcessModuleSlotWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress, slot, instanceId), serviceCallback); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessModuleInfoInner object + */ + public Observable getInstanceProcessModuleSlotAsync(String resourceGroupName, String name, String processId, String baseAddress, String slot, String instanceId) { + return getInstanceProcessModuleSlotWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress, slot, instanceId).map(new Func1, ProcessModuleInfoInner>() { + @Override + public ProcessModuleInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessModuleInfoInner object + */ + public Observable> getInstanceProcessModuleSlotWithServiceResponseAsync(String resourceGroupName, String name, String processId, String baseAddress, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId is required and cannot be null."); + } + if (baseAddress == null) { + throw new IllegalArgumentException("Parameter baseAddress 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.getInstanceProcessModuleSlot(resourceGroupName, name, processId, baseAddress, 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 = getInstanceProcessModuleSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessModuleSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessThreadInfoInner> object if successful. + */ + public PagedList listInstanceProcessThreadsSlot(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId) { + ServiceResponse> response = listInstanceProcessThreadsSlotSinglePageAsync(resourceGroupName, name, processId, slot, instanceId).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessThreadsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessThreadsSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessThreadsSlotSinglePageAsync(resourceGroupName, name, processId, slot, instanceId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessThreadsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable> listInstanceProcessThreadsSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId) { + return listInstanceProcessThreadsSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot, instanceId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable>> listInstanceProcessThreadsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId) { + return listInstanceProcessThreadsSlotSinglePageAsync(resourceGroupName, name, processId, slot, instanceId) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessThreadsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param processId PID. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + ServiceResponse> * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessThreadInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessThreadsSlotSinglePageAsync(final String resourceGroupName, final String name, final String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.listInstanceProcessThreadsSlot(resourceGroupName, name, processId, 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 = listInstanceProcessThreadsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessThreadsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessThreadInfoInner object if successful. + */ + public ProcessThreadInfoInner getInstanceProcessThreadSlot(String resourceGroupName, String name, String processId, String threadId, String slot, String instanceId) { + return getInstanceProcessThreadSlotWithServiceResponseAsync(resourceGroupName, name, processId, threadId, slot, instanceId).toBlocking().single().body(); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceProcessThreadSlotAsync(String resourceGroupName, String name, String processId, String threadId, String slot, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceProcessThreadSlotWithServiceResponseAsync(resourceGroupName, name, processId, threadId, slot, instanceId), serviceCallback); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessThreadInfoInner object + */ + public Observable getInstanceProcessThreadSlotAsync(String resourceGroupName, String name, String processId, String threadId, String slot, String instanceId) { + return getInstanceProcessThreadSlotWithServiceResponseAsync(resourceGroupName, name, processId, threadId, slot, instanceId).map(new Func1, ProcessThreadInfoInner>() { + @Override + public ProcessThreadInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessThreadInfoInner object + */ + public Observable> getInstanceProcessThreadSlotWithServiceResponseAsync(String resourceGroupName, String name, String processId, String threadId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId is required and cannot be null."); + } + if (threadId == null) { + throw new IllegalArgumentException("Parameter threadId 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.getInstanceProcessThreadSlot(resourceGroupName, name, processId, threadId, 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 = getInstanceProcessThreadSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessThreadSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteCloneabilityInner object if successful. + */ + public SiteCloneabilityInner isCloneableSlot(String resourceGroupName, String name, String slot) { + return isCloneableSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture isCloneableSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(isCloneableSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteCloneabilityInner object + */ + public Observable isCloneableSlotAsync(String resourceGroupName, String name, String slot) { + return isCloneableSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteCloneabilityInner>() { + @Override + public SiteCloneabilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteCloneabilityInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = isCloneableSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse isCloneableSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * This is to allow calling via powershell and ARM template. + * This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FunctionSecretsInner object if successful. + */ + public FunctionSecretsInner listSyncFunctionTriggersSlot(String resourceGroupName, String name, String slot) { + return listSyncFunctionTriggersSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * This is to allow calling via powershell and ARM template. + * This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listSyncFunctionTriggersSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listSyncFunctionTriggersSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * This is to allow calling via powershell and ARM template. + * This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionSecretsInner object + */ + public Observable listSyncFunctionTriggersSlotAsync(String resourceGroupName, String name, String slot) { + return listSyncFunctionTriggersSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, FunctionSecretsInner>() { + @Override + public FunctionSecretsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * This is to allow calling via powershell and ARM template. + * This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FunctionSecretsInner object + */ + public Observable> listSyncFunctionTriggersSlotWithServiceResponseAsync(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.listSyncFunctionTriggersSlot(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 = listSyncFunctionTriggersSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSyncFunctionTriggersSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listMetricDefinitionsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listMetricDefinitionsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricDefinitionsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricDefinitionsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + 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.body(); + } + }); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> 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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricDefinitionsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse> result = listMetricDefinitionsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricDefinitionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMetricsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listMetricsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + 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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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."); + } + 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) { + try { + ServiceResponse> result = listMetricsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. + * @param details Specify "true" to include metric details in the response. It is "false" by default. + * @param filter Return only metrics specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + 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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. + * @param details Specify "true" to include metric details in the response. It is "false" by default. + * @param filter Return only metrics specified in the filter (using OData syntax). For 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsSlotAsync(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSlotSinglePageAsync(resourceGroupName, name, slot, details, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. + * @param details Specify "true" to include metric details in the response. It is "false" by default. + * @param filter Return only metrics specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + 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.body(); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. + * @param details Specify "true" to include metric details in the response. It is "false" by default. + * @param filter Return only metrics specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + 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(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. + ServiceResponse> * @param details Specify "true" to include metric details in the response. It is "false" by default. + ServiceResponse> * @param filter Return only metrics specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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> result = listMetricsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MigrateMySqlStatusInner object if successful. + */ + public MigrateMySqlStatusInner getMigrateMySqlStatusSlot(String resourceGroupName, String name, String slot) { + return getMigrateMySqlStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMigrateMySqlStatusSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMigrateMySqlStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MigrateMySqlStatusInner object + */ + public Observable getMigrateMySqlStatusSlotAsync(String resourceGroupName, String name, String slot) { + return getMigrateMySqlStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, MigrateMySqlStatusInner>() { + @Override + public MigrateMySqlStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MigrateMySqlStatusInner object + */ + public Observable> getMigrateMySqlStatusSlotWithServiceResponseAsync(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.getMigrateMySqlStatusSlot(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 = getMigrateMySqlStatusSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMigrateMySqlStatusSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. This can either be "summary" or "detailed". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkFeaturesInner object if successful. + */ + public NetworkFeaturesInner listNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot) { + return listNetworkFeaturesSlotWithServiceResponseAsync(resourceGroupName, name, view, slot).toBlocking().single().body(); + } + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. This can either be "summary" or "detailed". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listNetworkFeaturesSlotAsync(String resourceGroupName, String name, String view, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listNetworkFeaturesSlotWithServiceResponseAsync(resourceGroupName, name, view, slot), serviceCallback); + } + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. This can either be "summary" or "detailed". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkFeaturesInner object + */ + public Observable listNetworkFeaturesSlotAsync(String resourceGroupName, String name, String view, String slot) { + return listNetworkFeaturesSlotWithServiceResponseAsync(resourceGroupName, name, view, slot).map(new Func1, NetworkFeaturesInner>() { + @Override + public NetworkFeaturesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. This can either be "summary" or "detailed". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkFeaturesInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = listNetworkFeaturesSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listNetworkFeaturesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String startWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot) { + return startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable startWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + return startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> startWebSiteNetworkTraceSlotWithServiceResponseAsync(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"; + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return service.startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startWebSiteNetworkTraceSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String startWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable startWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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 maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> startWebSiteNetworkTraceSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + if (resourceGroupName == null) { + throw new 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.startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startWebSiteNetworkTraceSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse startWebSiteNetworkTraceSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String stopWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot) { + return stopWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture stopWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable stopWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + return stopWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> stopWebSiteNetworkTraceSlotWithServiceResponseAsync(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.stopWebSiteNetworkTraceSlot(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 = stopWebSiteNetworkTraceSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopWebSiteNetworkTraceSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void generateNewSitePublishingPasswordSlot(String resourceGroupName, String name, String slot) { + generateNewSitePublishingPasswordSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture generateNewSitePublishingPasswordSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(generateNewSitePublishingPasswordSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable generateNewSitePublishingPasswordSlotAsync(String resourceGroupName, String name, String slot) { + return generateNewSitePublishingPasswordSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> generateNewSitePublishingPasswordSlotWithServiceResponseAsync(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.generateNewSitePublishingPasswordSlot(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 = generateNewSitePublishingPasswordSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse generateNewSitePublishingPasswordSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PerfMonResponseInner> object if successful. + */ + public PagedList listPerfMonCountersSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPerfMonCountersSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + 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 the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PerfMonResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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 (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.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) { + try { + ServiceResponse> result = listPerfMonCountersSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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/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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PerfMonResponseInner> object if successful. + */ + 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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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/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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPerfMonCountersSlotAsync(final String resourceGroupName, final String name, final String slot, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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/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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + 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.body(); + } + }); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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/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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + 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.body().nextPageLink(); + 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 the resource group to which the resource belongs. + 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/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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 (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.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) { + try { + ServiceResponse> result = listPerfMonCountersSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPerfMonCountersSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets web app's event logs. + * Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SitePhpErrorLogFlagInner object if successful. + */ + public SitePhpErrorLogFlagInner getSitePhpErrorLogFlagSlot(String resourceGroupName, String name, String slot) { + return getSitePhpErrorLogFlagSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets web app's event logs. + * Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSitePhpErrorLogFlagSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSitePhpErrorLogFlagSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets web app's event logs. + * Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SitePhpErrorLogFlagInner object + */ + public Observable getSitePhpErrorLogFlagSlotAsync(String resourceGroupName, String name, String slot) { + return getSitePhpErrorLogFlagSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SitePhpErrorLogFlagInner>() { + @Override + public SitePhpErrorLogFlagInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets web app's event logs. + * Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SitePhpErrorLogFlagInner object + */ + 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 (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.getSitePhpErrorLogFlagSlot(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 = getSitePhpErrorLogFlagSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSitePhpErrorLogFlagSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the premier add-ons of an app. + * Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PremierAddOnInner object if successful. + */ + public PremierAddOnInner listPremierAddOnsSlot(String resourceGroupName, String name, String slot) { + return listPremierAddOnsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the premier add-ons of an app. + * Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listPremierAddOnsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listPremierAddOnsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the premier add-ons of an app. + * Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + public Observable listPremierAddOnsSlotAsync(String resourceGroupName, String name, String slot) { + return listPremierAddOnsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, PremierAddOnInner>() { + @Override + public PremierAddOnInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the premier add-ons of an app. + * Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + 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 (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.listPremierAddOnsSlot(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 = listPremierAddOnsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listPremierAddOnsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a named add-on of an app. + * Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PremierAddOnInner object if successful. + */ + public PremierAddOnInner getPremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot) { + return getPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).toBlocking().single().body(); + } + + /** + * Gets a named add-on of an app. + * Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot), serviceCallback); + } + + /** + * Gets a named add-on of an app. + * Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + public Observable getPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { + return getPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).map(new Func1, PremierAddOnInner>() { + @Override + public PremierAddOnInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a named add-on of an app. + * Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = getPremierAddOnSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates a named add-on of an app. + * Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PremierAddOnInner object if successful. + */ + public PremierAddOnInner addPremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner premierAddOn) { + return addPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn).toBlocking().single().body(); + } + + /** + * Updates a named add-on of an app. + * Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner premierAddOn, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn), serviceCallback); + } + + /** + * Updates a named add-on of an app. + * Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + public Observable addPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner premierAddOn) { + return addPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn).map(new Func1, PremierAddOnInner>() { + @Override + public PremierAddOnInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a named add-on of an app. + * Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PremierAddOnInner object + */ + public Observable> addPremierAddOnSlotWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner 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 (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."); + } + 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) { + try { + ServiceResponse clientResponse = addPremierAddOnSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addPremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a premier add-on from an app. + * Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deletePremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot) { + deletePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).toBlocking().single().body(); + } + + /** + * Delete a premier add-on from an app. + * Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deletePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deletePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot), serviceCallback); + } + + /** + * Delete a premier add-on from an app. + * Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deletePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { + return deletePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a premier add-on from an app. + * Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 (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."); + } + 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 = deletePremierAddOnSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deletePremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessInfoInner> object if successful. + */ + public PagedList listProcessesSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listProcessesSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessesSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessesSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable> listProcessesSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listProcessesSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable>> listProcessesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listProcessesSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessesSlotSinglePageAsync(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.listProcessesSlot(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 = listProcessesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessInfoInner object if successful. + */ + public ProcessInfoInner getProcessSlot(String resourceGroupName, String name, String processId, String slot) { + return getProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot).toBlocking().single().body(); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getProcessSlotAsync(String resourceGroupName, String name, String processId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot), serviceCallback); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessInfoInner object + */ + public Observable getProcessSlotAsync(String resourceGroupName, String name, String processId, String slot) { + return getProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot).map(new Func1, ProcessInfoInner>() { + @Override + public ProcessInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessInfoInner object + */ + public Observable> getProcessSlotWithServiceResponseAsync(String resourceGroupName, String name, String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.getProcessSlot(resourceGroupName, name, processId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteProcessSlot(String resourceGroupName, String name, String processId, String slot) { + deleteProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot).toBlocking().single().body(); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteProcessSlotAsync(String resourceGroupName, String name, String processId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot), serviceCallback); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteProcessSlotAsync(String resourceGroupName, String name, String processId, String slot) { + return deleteProcessSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteProcessSlotWithServiceResponseAsync(String resourceGroupName, String name, String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.deleteProcessSlot(resourceGroupName, name, processId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteProcessSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteProcessSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream getProcessDumpSlot(String resourceGroupName, String name, String processId, String slot) { + return getProcessDumpSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot).toBlocking().single().body(); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getProcessDumpSlotAsync(String resourceGroupName, String name, String processId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getProcessDumpSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot), serviceCallback); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable getProcessDumpSlotAsync(String resourceGroupName, String name, String processId, String slot) { + return getProcessDumpSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> getProcessDumpSlotWithServiceResponseAsync(String resourceGroupName, String name, String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.getProcessDumpSlot(resourceGroupName, name, processId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessDumpSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessDumpSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessModuleInfoInner> object if successful. + */ + public PagedList listProcessModulesSlot(final String resourceGroupName, final String name, final String processId, final String slot) { + ServiceResponse> response = listProcessModulesSlotSinglePageAsync(resourceGroupName, name, processId, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessModulesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessModulesSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessModulesSlotSinglePageAsync(resourceGroupName, name, processId, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessModulesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable> listProcessModulesSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot) { + return listProcessModulesSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable>> listProcessModulesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String processId, final String slot) { + return listProcessModulesSlotSinglePageAsync(resourceGroupName, name, processId, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessModulesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param processId PID. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessModuleInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessModulesSlotSinglePageAsync(final String resourceGroupName, final String name, final String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.listProcessModulesSlot(resourceGroupName, name, processId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessModulesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessModulesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessModuleInfoInner object if successful. + */ + public ProcessModuleInfoInner getProcessModuleSlot(String resourceGroupName, String name, String processId, String baseAddress, String slot) { + return getProcessModuleSlotWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress, slot).toBlocking().single().body(); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getProcessModuleSlotAsync(String resourceGroupName, String name, String processId, String baseAddress, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getProcessModuleSlotWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress, slot), serviceCallback); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessModuleInfoInner object + */ + public Observable getProcessModuleSlotAsync(String resourceGroupName, String name, String processId, String baseAddress, String slot) { + return getProcessModuleSlotWithServiceResponseAsync(resourceGroupName, name, processId, baseAddress, slot).map(new Func1, ProcessModuleInfoInner>() { + @Override + public ProcessModuleInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessModuleInfoInner object + */ + public Observable> getProcessModuleSlotWithServiceResponseAsync(String resourceGroupName, String name, String processId, String baseAddress, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId is required and cannot be null."); + } + if (baseAddress == null) { + throw new IllegalArgumentException("Parameter baseAddress 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.getProcessModuleSlot(resourceGroupName, name, processId, baseAddress, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessModuleSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessModuleSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessThreadInfoInner> object if successful. + */ + public PagedList listProcessThreadsSlot(final String resourceGroupName, final String name, final String processId, final String slot) { + ServiceResponse> response = listProcessThreadsSlotSinglePageAsync(resourceGroupName, name, processId, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessThreadsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessThreadsSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessThreadsSlotSinglePageAsync(resourceGroupName, name, processId, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessThreadsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable> listProcessThreadsSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot) { + return listProcessThreadsSlotWithServiceResponseAsync(resourceGroupName, name, processId, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable>> listProcessThreadsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String processId, final String slot) { + return listProcessThreadsSlotSinglePageAsync(resourceGroupName, name, processId, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessThreadsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param processId PID. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessThreadInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessThreadsSlotSinglePageAsync(final String resourceGroupName, final String name, final String processId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId 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.listProcessThreadsSlot(resourceGroupName, name, processId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessThreadsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessThreadsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProcessThreadInfoInner object if successful. + */ + public ProcessThreadInfoInner getProcessThreadSlot(String resourceGroupName, String name, String processId, String threadId, String slot) { + return getProcessThreadSlotWithServiceResponseAsync(resourceGroupName, name, processId, threadId, slot).toBlocking().single().body(); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getProcessThreadSlotAsync(String resourceGroupName, String name, String processId, String threadId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getProcessThreadSlotWithServiceResponseAsync(resourceGroupName, name, processId, threadId, slot), serviceCallback); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessThreadInfoInner object + */ + public Observable getProcessThreadSlotAsync(String resourceGroupName, String name, String processId, String threadId, String slot) { + return getProcessThreadSlotWithServiceResponseAsync(resourceGroupName, name, processId, threadId, slot).map(new Func1, ProcessThreadInfoInner>() { + @Override + public ProcessThreadInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param threadId TID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProcessThreadInfoInner object + */ + public Observable> getProcessThreadSlotWithServiceResponseAsync(String resourceGroupName, String name, String processId, String threadId, 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 (processId == null) { + throw new IllegalArgumentException("Parameter processId is required and cannot be null."); + } + if (threadId == null) { + throw new IllegalArgumentException("Parameter threadId 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.getProcessThreadSlot(resourceGroupName, name, processId, threadId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessThreadSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessThreadSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PublicCertificateInner> object if successful. + */ + public PagedList listPublicCertificatesSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listPublicCertificatesSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPublicCertificatesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPublicCertificatesSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPublicCertificatesSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPublicCertificatesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicCertificateInner> object + */ + public Observable> listPublicCertificatesSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listPublicCertificatesSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicCertificateInner> object + */ + public Observable>> listPublicCertificatesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listPublicCertificatesSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPublicCertificatesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicCertificateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPublicCertificatesSlotSinglePageAsync(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.listPublicCertificatesSlot(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 = listPublicCertificatesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPublicCertificatesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PublicCertificateInner object if successful. + */ + public PublicCertificateInner getPublicCertificateSlot(String resourceGroupName, String name, String slot, String publicCertificateName) { + return getPublicCertificateSlotWithServiceResponseAsync(resourceGroupName, name, slot, publicCertificateName).toBlocking().single().body(); + } + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. + * @param publicCertificateName Public certificate name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getPublicCertificateSlotAsync(String resourceGroupName, String name, String slot, String publicCertificateName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPublicCertificateSlotWithServiceResponseAsync(resourceGroupName, name, slot, publicCertificateName), serviceCallback); + } + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicCertificateInner object + */ + public Observable getPublicCertificateSlotAsync(String resourceGroupName, String name, String slot, String publicCertificateName) { + return getPublicCertificateSlotWithServiceResponseAsync(resourceGroupName, name, slot, publicCertificateName).map(new Func1, PublicCertificateInner>() { + @Override + public PublicCertificateInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicCertificateInner object + */ + public Observable> getPublicCertificateSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String publicCertificateName) { + if (resourceGroupName == null) { + throw new 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 (publicCertificateName == null) { + throw new IllegalArgumentException("Parameter publicCertificateName 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.getPublicCertificateSlot(resourceGroupName, name, slot, publicCertificateName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPublicCertificateSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPublicCertificateSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PublicCertificateInner object if successful. + */ + public PublicCertificateInner createOrUpdatePublicCertificateSlot(String resourceGroupName, String name, String publicCertificateName, String slot, PublicCertificateInner publicCertificate) { + return createOrUpdatePublicCertificateSlotWithServiceResponseAsync(resourceGroupName, name, publicCertificateName, slot, publicCertificate).toBlocking().single().body(); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate object. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdatePublicCertificateSlotAsync(String resourceGroupName, String name, String publicCertificateName, String slot, PublicCertificateInner publicCertificate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdatePublicCertificateSlotWithServiceResponseAsync(resourceGroupName, name, publicCertificateName, slot, publicCertificate), serviceCallback); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicCertificateInner object + */ + public Observable createOrUpdatePublicCertificateSlotAsync(String resourceGroupName, String name, String publicCertificateName, String slot, PublicCertificateInner publicCertificate) { + return createOrUpdatePublicCertificateSlotWithServiceResponseAsync(resourceGroupName, name, publicCertificateName, slot, publicCertificate).map(new Func1, PublicCertificateInner>() { + @Override + public PublicCertificateInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a hostname binding for an app. + * Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicCertificateInner object + */ + public Observable> createOrUpdatePublicCertificateSlotWithServiceResponseAsync(String resourceGroupName, String name, String publicCertificateName, String slot, PublicCertificateInner publicCertificate) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (publicCertificateName == null) { + throw new IllegalArgumentException("Parameter publicCertificateName 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 (publicCertificate == null) { + throw new IllegalArgumentException("Parameter publicCertificate is required and cannot be null."); + } + Validator.validate(publicCertificate); + final String apiVersion = "2016-08-01"; + return service.createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCertificateName, slot, this.client.subscriptionId(), publicCertificate, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdatePublicCertificateSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdatePublicCertificateSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deletePublicCertificateSlot(String resourceGroupName, String name, String slot, String publicCertificateName) { + deletePublicCertificateSlotWithServiceResponseAsync(resourceGroupName, name, slot, publicCertificateName).toBlocking().single().body(); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param publicCertificateName Public certificate name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deletePublicCertificateSlotAsync(String resourceGroupName, String name, String slot, String publicCertificateName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deletePublicCertificateSlotWithServiceResponseAsync(resourceGroupName, name, slot, publicCertificateName), serviceCallback); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deletePublicCertificateSlotAsync(String resourceGroupName, String name, String slot, String publicCertificateName) { + return deletePublicCertificateSlotWithServiceResponseAsync(resourceGroupName, name, slot, publicCertificateName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a hostname binding for an app. + * Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deletePublicCertificateSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String publicCertificateName) { + if (resourceGroupName == null) { + throw new 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 (publicCertificateName == null) { + throw new IllegalArgumentException("Parameter publicCertificateName 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.deletePublicCertificateSlot(resourceGroupName, name, slot, publicCertificateName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deletePublicCertificateSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deletePublicCertificateSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream listPublishingProfileXmlWithSecretsSlot(String resourceGroupName, String name, String slot) { + return listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listPublishingProfileXmlWithSecretsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable listPublishingProfileXmlWithSecretsSlotAsync(String resourceGroupName, String name, String slot) { + return listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + 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 (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 PublishingProfileFormat format = null; + CsmPublishingProfileOptions publishingProfileOptions = new CsmPublishingProfileOptions(); + publishingProfileOptions.withFormat(null); + return service.listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), publishingProfileOptions, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listPublishingProfileXmlWithSecretsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InputStream object if successful. + */ + public InputStream listPublishingProfileXmlWithSecretsSlot(String resourceGroupName, String name, String slot, PublishingProfileFormat format) { + return listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot, format).toBlocking().single().body(); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listPublishingProfileXmlWithSecretsSlotAsync(String resourceGroupName, String name, String slot, PublishingProfileFormat format, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot, format), serviceCallback); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable listPublishingProfileXmlWithSecretsSlotAsync(String resourceGroupName, String name, String slot, PublishingProfileFormat format) { + return listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot, format).map(new Func1, InputStream>() { + @Override + public InputStream call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, PublishingProfileFormat 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."); + } + final String apiVersion = "2016-08-01"; + CsmPublishingProfileOptions publishingProfileOptions = new CsmPublishingProfileOptions(); + publishingProfileOptions.withFormat(format); + return service.listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), publishingProfileOptions, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listPublishingProfileXmlWithSecretsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listPublishingProfileXmlWithSecretsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void recoverSlot(String resourceGroupName, String name, String slot, SnapshotRecoveryRequestInner recoveryEntity) { + recoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).toBlocking().last().body(); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture recoverSlotAsync(String resourceGroupName, String name, String slot, SnapshotRecoveryRequestInner recoveryEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(recoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity), serviceCallback); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable recoverSlotAsync(String resourceGroupName, String name, String slot, SnapshotRecoveryRequestInner recoveryEntity) { + return recoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> recoverSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SnapshotRecoveryRequestInner 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 (recoveryEntity == null) { + throw new IllegalArgumentException("Parameter recoveryEntity is required and cannot be null."); + } + 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()); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRecoverSlot(String resourceGroupName, String name, String slot, SnapshotRecoveryRequestInner recoveryEntity) { + beginRecoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).toBlocking().single().body(); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRecoverSlotAsync(String resourceGroupName, String name, String slot, SnapshotRecoveryRequestInner recoveryEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRecoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity), serviceCallback); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRecoverSlotAsync(String resourceGroupName, String name, String slot, SnapshotRecoveryRequestInner recoveryEntity) { + return beginRecoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Recovers a web app to a previous snapshot. + * Recovers a web app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRecoverSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SnapshotRecoveryRequestInner 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 (recoveryEntity == null) { + throw new IllegalArgumentException("Parameter recoveryEntity is required and cannot be null."); + } + 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) { + try { + ServiceResponse clientResponse = beginRecoverSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRecoverSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resetSlotConfigurationSlot(String resourceGroupName, String name, String slot) { + resetSlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resetSlotConfigurationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetSlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable resetSlotConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return resetSlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 (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.resetSlotConfigurationSlot(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 = resetSlotConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resetSlotConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restartSlot(String resourceGroupName, String name, String slot) { + restartSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture restartSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable restartSlotAsync(String resourceGroupName, String name, String slot) { + return restartSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 (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 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) { + try { + ServiceResponse clientResponse = restartSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restartSlot(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) { + restartSlotWithServiceResponseAsync(resourceGroupName, name, slot, softRestart, synchronous).toBlocking().single().body(); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture restartSlotAsync(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartSlotWithServiceResponseAsync(resourceGroupName, name, slot, softRestart, synchronous), serviceCallback); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable restartSlotAsync(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) { + return restartSlotWithServiceResponseAsync(resourceGroupName, name, slot, softRestart, synchronous).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 (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.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 = restartSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse restartSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteExtensionInfoInner> object if successful. + */ + public PagedList listSiteExtensionsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listSiteExtensionsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteExtensionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteExtensionsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteExtensionsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteExtensionsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteExtensionInfoInner> object + */ + public Observable> listSiteExtensionsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listSiteExtensionsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteExtensionInfoInner> object + */ + public Observable>> listSiteExtensionsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listSiteExtensionsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteExtensionsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteExtensionInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteExtensionsSlotSinglePageAsync(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.listSiteExtensionsSlot(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 = listSiteExtensionsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteExtensionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteExtensionInfoInner object if successful. + */ + public SiteExtensionInfoInner getSiteExtensionSlot(String resourceGroupName, String name, String siteExtensionId, String slot) { + return getSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot).toBlocking().single().body(); + } + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot), serviceCallback); + } + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteExtensionInfoInner object + */ + public Observable getSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot) { + return getSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot).map(new Func1, SiteExtensionInfoInner>() { + @Override + public SiteExtensionInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteExtensionInfoInner object + */ + public Observable> getSiteExtensionSlotWithServiceResponseAsync(String resourceGroupName, String name, String siteExtensionId, 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 (siteExtensionId == null) { + throw new IllegalArgumentException("Parameter siteExtensionId 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.getSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteExtensionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteExtensionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteExtensionInfoInner object if successful. + */ + public SiteExtensionInfoInner installSiteExtensionSlot(String resourceGroupName, String name, String siteExtensionId, String slot) { + return installSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot).toBlocking().last().body(); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture installSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(installSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot), serviceCallback); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable installSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot) { + return installSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot).map(new Func1, SiteExtensionInfoInner>() { + @Override + public SiteExtensionInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> installSiteExtensionSlotWithServiceResponseAsync(String resourceGroupName, String name, String siteExtensionId, 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 (siteExtensionId == null) { + throw new IllegalArgumentException("Parameter siteExtensionId 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"; + Observable> observable = service.installSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteExtensionInfoInner object if successful. + */ + public SiteExtensionInfoInner beginInstallSiteExtensionSlot(String resourceGroupName, String name, String siteExtensionId, String slot) { + return beginInstallSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot).toBlocking().single().body(); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginInstallSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginInstallSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot), serviceCallback); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteExtensionInfoInner object + */ + public Observable beginInstallSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot) { + return beginInstallSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot).map(new Func1, SiteExtensionInfoInner>() { + @Override + public SiteExtensionInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteExtensionInfoInner object + */ + public Observable> beginInstallSiteExtensionSlotWithServiceResponseAsync(String resourceGroupName, String name, String siteExtensionId, 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 (siteExtensionId == null) { + throw new IllegalArgumentException("Parameter siteExtensionId 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.beginInstallSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginInstallSiteExtensionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginInstallSiteExtensionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(429, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Remove a site extension from a web site, or a deployment slot. + * Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteSiteExtensionSlot(String resourceGroupName, String name, String siteExtensionId, String slot) { + deleteSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot).toBlocking().single().body(); + } + + /** + * Remove a site extension from a web site, or a deployment slot. + * Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot), serviceCallback); + } + + /** + * Remove a site extension from a web site, or a deployment slot. + * Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot) { + return deleteSiteExtensionSlotWithServiceResponseAsync(resourceGroupName, name, siteExtensionId, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove a site extension from a web site, or a deployment slot. + * Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteSiteExtensionSlotWithServiceResponseAsync(String resourceGroupName, String name, String siteExtensionId, 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 (siteExtensionId == null) { + throw new IllegalArgumentException("Parameter siteExtensionId 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.deleteSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSiteExtensionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSiteExtensionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SlotDifferenceInner> object if successful. + */ + public PagedList listSlotDifferencesSlot(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { + ServiceResponse> response = listSlotDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSlotDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSlotDifferencesSlotAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSlotDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSlotDifferencesSlotNextSinglePageAsync(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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SlotDifferenceInner> object + */ + public Observable> listSlotDifferencesSlotAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { + return listSlotDifferencesSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SlotDifferenceInner> object + */ + public Observable>> listSlotDifferencesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { + return listSlotDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSlotDifferencesSlotNextWithServiceResponseAsync(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 the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + ServiceResponse> * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSlotDifferencesSlotSinglePageAsync(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 (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.listSlotDifferencesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSlotDifferencesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSlotDifferencesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void swapSlotSlot(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + swapSlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().last().body(); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture swapSlotSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(swapSlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity), serviceCallback); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable swapSlotSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + return swapSlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> swapSlotSlotWithServiceResponseAsync(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"; + Observable> observable = service.swapSlotSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginSwapSlotSlot(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + beginSwapSlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single().body(); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginSwapSlotSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSwapSlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity), serviceCallback); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginSwapSlotSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + return beginSwapSlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginSwapSlotSlotWithServiceResponseAsync(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.beginSwapSlotSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginSwapSlotSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginSwapSlotSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SnapshotInner> object if successful. + */ + public PagedList listSnapshotsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listSnapshotsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSnapshotsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSnapshotsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSnapshotsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSnapshotsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + 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 Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Website Name. + ServiceResponse> * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the source control configuration of an app. + * Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner getSourceControlSlot(String resourceGroupName, String name, String slot) { + return getSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the source control configuration of an app. + * Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control configuration for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the source control configuration of an app. + * Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteSourceControlInner object + */ + public Observable getSourceControlSlotAsync(String resourceGroupName, String name, String slot) { + return getSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteSourceControlInner>() { + @Override + public SiteSourceControlInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the source control configuration of an app. + * Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteSourceControlInner object + */ + 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."); + } + 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) { + try { + ServiceResponse clientResponse = getSourceControlSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner createOrUpdateSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return createOrUpdateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).toBlocking().last().body(); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl), serviceCallback); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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.body(); + } + }); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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"; + Observable> observable = service.createOrUpdateSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteSourceControl, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner beginCreateOrUpdateSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return beginCreateOrUpdateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).toBlocking().single().body(); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl), serviceCallback); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteSourceControlInner object + */ + public Observable beginCreateOrUpdateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return beginCreateOrUpdateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).map(new Func1, SiteSourceControlInner>() { + @Override + public SiteSourceControlInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteSourceControlInner object + */ + public Observable> beginCreateOrUpdateSourceControlSlotWithServiceResponseAsync(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.beginCreateOrUpdateSourceControlSlot(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 = beginCreateOrUpdateSourceControlSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the source control configuration of an app. + * Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteSourceControlSlot(String resourceGroupName, String name, String slot) { + deleteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Deletes the source control configuration of an app. + * Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Deletes the source control configuration of an app. + * Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteSourceControlSlotAsync(String resourceGroupName, String name, String slot) { + return deleteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the source control configuration of an app. + * Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner updateSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return updateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).toBlocking().single().body(); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl), serviceCallback); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Starts an app (or deployment slot, if specified). + * Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void startSlot(String resourceGroupName, String name, String slot) { + startSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Starts an app (or deployment slot, if specified). + * Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Starts an app (or deployment slot, if specified). + * Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable startSlotAsync(String resourceGroupName, String name, String slot) { + return startSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts an app (or deployment slot, if specified). + * Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stops an app (or deployment slot, if specified). + * Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stopSlot(String resourceGroupName, String name, String slot) { + stopSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Stops an app (or deployment slot, if specified). + * Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture stopSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Stops an app (or deployment slot, if specified). + * Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable stopSlotAsync(String resourceGroupName, String name, String slot) { + return stopSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops an app (or deployment slot, if specified). + * Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void syncRepositorySlot(String resourceGroupName, String name, String slot) { + syncRepositorySlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture syncRepositorySlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(syncRepositorySlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable syncRepositorySlotAsync(String resourceGroupName, String name, String slot) { + return syncRepositorySlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Syncs function trigger metadata to the scale controller. + * Syncs function trigger metadata to the scale controller. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void syncFunctionTriggersSlot(String resourceGroupName, String name, String slot) { + syncFunctionTriggersSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Syncs function trigger metadata to the scale controller. + * Syncs function trigger metadata to the scale controller. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture syncFunctionTriggersSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(syncFunctionTriggersSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Syncs function trigger metadata to the scale controller. + * Syncs function trigger metadata to the scale controller. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable syncFunctionTriggersSlotAsync(String resourceGroupName, String name, String slot) { + return syncFunctionTriggersSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Syncs function trigger metadata to the scale controller. + * Syncs function trigger metadata to the scale controller. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> syncFunctionTriggersSlotWithServiceResponseAsync(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.syncFunctionTriggersSlot(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 = syncFunctionTriggersSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse syncFunctionTriggersSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TriggeredWebJobInner> object if successful. + */ + public PagedList listTriggeredWebJobsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listTriggeredWebJobsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTriggeredWebJobsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTriggeredWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTriggeredWebJobsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTriggeredWebJobsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredWebJobInner> object + */ + public Observable> listTriggeredWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listTriggeredWebJobsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredWebJobInner> object + */ + public Observable>> listTriggeredWebJobsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listTriggeredWebJobsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTriggeredWebJobsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TriggeredWebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTriggeredWebJobsSlotSinglePageAsync(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.listTriggeredWebJobsSlot(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 = listTriggeredWebJobsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TriggeredWebJobInner object if successful. + */ + public TriggeredWebJobInner getTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + return getTriggeredWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).toBlocking().single().body(); + } + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTriggeredWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot), serviceCallback); + } + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggeredWebJobInner object + */ + public Observable getTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + return getTriggeredWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).map(new Func1, TriggeredWebJobInner>() { + @Override + public TriggeredWebJobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggeredWebJobInner object + */ + public Observable> getTriggeredWebJobSlotWithServiceResponseAsync(String resourceGroupName, String name, String webJobName, 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 (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.getTriggeredWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTriggeredWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTriggeredWebJobSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + deleteTriggeredWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).toBlocking().single().body(); + } + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteTriggeredWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot), serviceCallback); + } + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + return deleteTriggeredWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteTriggeredWebJobSlotWithServiceResponseAsync(String resourceGroupName, String name, String webJobName, 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 (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.deleteTriggeredWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteTriggeredWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteTriggeredWebJobSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TriggeredJobHistoryInner> object if successful. + */ + public PagedList listTriggeredWebJobHistorySlot(final String resourceGroupName, final String name, final String webJobName, final String slot) { + ServiceResponse> response = listTriggeredWebJobHistorySlotSinglePageAsync(resourceGroupName, name, webJobName, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTriggeredWebJobHistorySlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTriggeredWebJobHistorySlotAsync(final String resourceGroupName, final String name, final String webJobName, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTriggeredWebJobHistorySlotSinglePageAsync(resourceGroupName, name, webJobName, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTriggeredWebJobHistorySlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredJobHistoryInner> object + */ + public Observable> listTriggeredWebJobHistorySlotAsync(final String resourceGroupName, final String name, final String webJobName, final String slot) { + return listTriggeredWebJobHistorySlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredJobHistoryInner> object + */ + public Observable>> listTriggeredWebJobHistorySlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String webJobName, final String slot) { + return listTriggeredWebJobHistorySlotSinglePageAsync(resourceGroupName, name, webJobName, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTriggeredWebJobHistorySlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param webJobName Name of Web Job. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TriggeredJobHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTriggeredWebJobHistorySlotSinglePageAsync(final String resourceGroupName, final String name, final String webJobName, 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 (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.listTriggeredWebJobHistorySlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTriggeredWebJobHistorySlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobHistorySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TriggeredJobHistoryInner object if successful. + */ + public TriggeredJobHistoryInner getTriggeredWebJobHistorySlot(String resourceGroupName, String name, String webJobName, String id, String slot) { + return getTriggeredWebJobHistorySlotWithServiceResponseAsync(resourceGroupName, name, webJobName, id, slot).toBlocking().single().body(); + } + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getTriggeredWebJobHistorySlotAsync(String resourceGroupName, String name, String webJobName, String id, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTriggeredWebJobHistorySlotWithServiceResponseAsync(resourceGroupName, name, webJobName, id, slot), serviceCallback); + } + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggeredJobHistoryInner object + */ + public Observable getTriggeredWebJobHistorySlotAsync(String resourceGroupName, String name, String webJobName, String id, String slot) { + return getTriggeredWebJobHistorySlotWithServiceResponseAsync(resourceGroupName, name, webJobName, id, slot).map(new Func1, TriggeredJobHistoryInner>() { + @Override + public TriggeredJobHistoryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggeredJobHistoryInner object + */ + public Observable> getTriggeredWebJobHistorySlotWithServiceResponseAsync(String resourceGroupName, String name, String webJobName, 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 (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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."); + } + final String apiVersion = "2016-08-01"; + return service.getTriggeredWebJobHistorySlot(resourceGroupName, name, webJobName, id, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTriggeredWebJobHistorySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTriggeredWebJobHistorySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Run a triggered web job for an app, or a deployment slot. + * Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void runTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + runTriggeredWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).toBlocking().single().body(); + } + + /** + * Run a triggered web job for an app, or a deployment slot. + * Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture runTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(runTriggeredWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot), serviceCallback); + } + + /** + * Run a triggered web job for an app, or a deployment slot. + * Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable runTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + return runTriggeredWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Run a triggered web job for an app, or a deployment slot. + * Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> runTriggeredWebJobSlotWithServiceResponseAsync(String resourceGroupName, String name, String webJobName, 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 (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.runTriggeredWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = runTriggeredWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse runTriggeredWebJobSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. + * @param filter Return only information specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. + * @param filter Return only information specified in the filter (using OData syntax). For 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesSlotAsync(final String resourceGroupName, final String name, final String slot, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesSlotSinglePageAsync(resourceGroupName, name, slot, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. + * @param filter Return only information specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. + * @param filter Return only information specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. + ServiceResponse> * @param filter Return only information specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<VnetInfoInner> object if successful. + */ + public List listVnetConnectionsSlot(String resourceGroupName, String name, String slot) { + return listVnetConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listVnetConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listVnetConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner getVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) { + return getVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).toBlocking().single().body(); + } + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot), serviceCallback); + } + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the 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().body(); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) { + deleteVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).toBlocking().single().body(); + } + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot), serviceCallback); + } + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot) { + return deleteVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the 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().body(); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets an app's Virtual Network gateway. + * Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VnetGatewayInner object if successful. + */ + public VnetGatewayInner getVnetConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { + return getVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot).toBlocking().single().body(); + } + + /** + * Gets an app's Virtual Network gateway. + * Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual Network. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot), serviceCallback); + } + + /** + * Gets an app's Virtual Network gateway. + * Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VnetGatewayInner object + */ + public Observable getVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { + return getVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot).map(new Func1, VnetGatewayInner>() { + @Override + public VnetGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an app's Virtual Network gateway. + * Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VnetGatewayInner 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the 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().body(); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the 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().body(); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<WebJobInner> object if successful. + */ + public PagedList listWebJobsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listWebJobsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebJobsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebJobsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebJobsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebJobInner> object + */ + public Observable> listWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listWebJobsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebJobInner> object + */ + public Observable>> listWebJobsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listWebJobsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebJobsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebJobsSlotSinglePageAsync(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.listWebJobsSlot(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 = listWebJobsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebJobsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get webjob information for an app, or a deployment slot. + * Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WebJobInner object if successful. + */ + public WebJobInner getWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + return getWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).toBlocking().single().body(); + } + + /** + * Get webjob information for an app, or a deployment slot. + * Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot), serviceCallback); + } + + /** + * Get webjob information for an app, or a deployment slot. + * Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WebJobInner object + */ + public Observable getWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + return getWebJobSlotWithServiceResponseAsync(resourceGroupName, name, webJobName, slot).map(new Func1, WebJobInner>() { + @Override + public WebJobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get webjob information for an app, or a deployment slot. + * Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WebJobInner object + */ + public Observable> getWebJobSlotWithServiceResponseAsync(String resourceGroupName, String name, String webJobName, 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 (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.getWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getWebJobSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SlotDifferenceInner> object if successful. + */ + public PagedList listSlotDifferencesFromProduction(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { + ServiceResponse> response = listSlotDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSlotDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSlotDifferencesFromProductionAsync(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSlotDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSlotDifferencesFromProductionNextSinglePageAsync(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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SlotDifferenceInner> object + */ + public Observable> listSlotDifferencesFromProductionAsync(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { + return listSlotDifferencesFromProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * 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 the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SlotDifferenceInner> object + */ + public Observable>> listSlotDifferencesFromProductionWithServiceResponseAsync(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { + return listSlotDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSlotDifferencesFromProductionNextWithServiceResponseAsync(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 the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSlotDifferencesFromProductionSinglePageAsync(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.listSlotDifferencesFromProduction(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 = listSlotDifferencesFromProductionDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSlotDifferencesFromProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().last().body(); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + return swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginSwapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single().body(); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginSwapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginSwapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + return beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Swaps two deployment slots of an app. + * Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .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 Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SnapshotInner> object if successful. + */ + public PagedList listSnapshots(final String resourceGroupName, final String name) { + ServiceResponse> response = listSnapshotsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSnapshotsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSnapshotsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + 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 Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + 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 Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the source control configuration of an app. + * Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner getSourceControl(String resourceGroupName, String name) { + return getSourceControlWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the source control configuration of an app. + * Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSourceControlWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the source control configuration of an app. + * Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets the source control configuration of an app. + * Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner createOrUpdateSourceControl(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return createOrUpdateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).toBlocking().last().body(); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl), serviceCallback); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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.body(); + } + }); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + 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"; + Observable> observable = service.createOrUpdateSourceControl(resourceGroupName, name, this.client.subscriptionId(), siteSourceControl, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner beginCreateOrUpdateSourceControl(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return beginCreateOrUpdateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).toBlocking().single().body(); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl), serviceCallback); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteSourceControlInner object + */ + public Observable beginCreateOrUpdateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return beginCreateOrUpdateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).map(new Func1, SiteSourceControlInner>() { + @Override + public SiteSourceControlInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SiteSourceControlInner object + */ + public Observable> beginCreateOrUpdateSourceControlWithServiceResponseAsync(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.beginCreateOrUpdateSourceControl(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 = beginCreateOrUpdateSourceControlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the source control configuration of an app. + * Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteSourceControl(String resourceGroupName, String name) { + deleteSourceControlWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Deletes the source control configuration of an app. + * Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteSourceControlWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Deletes the source control configuration of an app. + * Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteSourceControlAsync(String resourceGroupName, String name) { + return deleteSourceControlWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the source control configuration of an app. + * Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner updateSourceControl(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return updateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).toBlocking().single().body(); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl), serviceCallback); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Updates the source control configuration of an app. + * Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Starts an app (or deployment slot, if specified). + * Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void start(String resourceGroupName, String name) { + startWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Starts an app (or deployment slot, if specified). + * Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Starts an app (or deployment slot, if specified). + * Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable startAsync(String resourceGroupName, String name) { + return startWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts an app (or deployment slot, if specified). + * Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stops an app (or deployment slot, if specified). + * Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stop(String resourceGroupName, String name) { + stopWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Stops an app (or deployment slot, if specified). + * Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture stopAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Stops an app (or deployment slot, if specified). + * Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable stopAsync(String resourceGroupName, String name) { + return stopWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops an app (or deployment slot, if specified). + * Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void syncRepository(String resourceGroupName, String name) { + syncRepositoryWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture syncRepositoryAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(syncRepositoryWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable syncRepositoryAsync(String resourceGroupName, String name) { + return syncRepositoryWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Syncs function trigger metadata to the scale controller. + * Syncs function trigger metadata to the scale controller. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void syncFunctionTriggers(String resourceGroupName, String name) { + syncFunctionTriggersWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Syncs function trigger metadata to the scale controller. + * Syncs function trigger metadata to the scale controller. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture syncFunctionTriggersAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(syncFunctionTriggersWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Syncs function trigger metadata to the scale controller. + * Syncs function trigger metadata to the scale controller. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable syncFunctionTriggersAsync(String resourceGroupName, String name) { + return syncFunctionTriggersWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Syncs function trigger metadata to the scale controller. + * Syncs function trigger metadata to the scale controller. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> syncFunctionTriggersWithServiceResponseAsync(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.syncFunctionTriggers(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 = syncFunctionTriggersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse syncFunctionTriggersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TriggeredWebJobInner> object if successful. + */ + public PagedList listTriggeredWebJobs(final String resourceGroupName, final String name) { + ServiceResponse> response = listTriggeredWebJobsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTriggeredWebJobsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTriggeredWebJobsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTriggeredWebJobsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTriggeredWebJobsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredWebJobInner> object + */ + public Observable> listTriggeredWebJobsAsync(final String resourceGroupName, final String name) { + return listTriggeredWebJobsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredWebJobInner> object + */ + public Observable>> listTriggeredWebJobsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listTriggeredWebJobsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTriggeredWebJobsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TriggeredWebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTriggeredWebJobsSinglePageAsync(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.listTriggeredWebJobs(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 = listTriggeredWebJobsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TriggeredWebJobInner object if successful. + */ + public TriggeredWebJobInner getTriggeredWebJob(String resourceGroupName, String name, String webJobName) { + return getTriggeredWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).toBlocking().single().body(); + } + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTriggeredWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName), serviceCallback); + } + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggeredWebJobInner object + */ + public Observable getTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName) { + return getTriggeredWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).map(new Func1, TriggeredWebJobInner>() { + @Override + public TriggeredWebJobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggeredWebJobInner object + */ + public Observable> getTriggeredWebJobWithServiceResponseAsync(String resourceGroupName, String name, String webJobName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.getTriggeredWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTriggeredWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTriggeredWebJobDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteTriggeredWebJob(String resourceGroupName, String name, String webJobName) { + deleteTriggeredWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).toBlocking().single().body(); + } + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteTriggeredWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName), serviceCallback); + } + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName) { + return deleteTriggeredWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteTriggeredWebJobWithServiceResponseAsync(String resourceGroupName, String name, String webJobName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.deleteTriggeredWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteTriggeredWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteTriggeredWebJobDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TriggeredJobHistoryInner> object if successful. + */ + public PagedList listTriggeredWebJobHistory(final String resourceGroupName, final String name, final String webJobName) { + ServiceResponse> response = listTriggeredWebJobHistorySinglePageAsync(resourceGroupName, name, webJobName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTriggeredWebJobHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTriggeredWebJobHistoryAsync(final String resourceGroupName, final String name, final String webJobName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTriggeredWebJobHistorySinglePageAsync(resourceGroupName, name, webJobName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTriggeredWebJobHistoryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredJobHistoryInner> object + */ + public Observable> listTriggeredWebJobHistoryAsync(final String resourceGroupName, final String name, final String webJobName) { + return listTriggeredWebJobHistoryWithServiceResponseAsync(resourceGroupName, name, webJobName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredJobHistoryInner> object + */ + public Observable>> listTriggeredWebJobHistoryWithServiceResponseAsync(final String resourceGroupName, final String name, final String webJobName) { + return listTriggeredWebJobHistorySinglePageAsync(resourceGroupName, name, webJobName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTriggeredWebJobHistoryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + ServiceResponse> * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TriggeredJobHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTriggeredWebJobHistorySinglePageAsync(final String resourceGroupName, final String name, final String webJobName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.listTriggeredWebJobHistory(resourceGroupName, name, webJobName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTriggeredWebJobHistoryDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobHistoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TriggeredJobHistoryInner object if successful. + */ + public TriggeredJobHistoryInner getTriggeredWebJobHistory(String resourceGroupName, String name, String webJobName, String id) { + return getTriggeredWebJobHistoryWithServiceResponseAsync(resourceGroupName, name, webJobName, id).toBlocking().single().body(); + } + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getTriggeredWebJobHistoryAsync(String resourceGroupName, String name, String webJobName, String id, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTriggeredWebJobHistoryWithServiceResponseAsync(resourceGroupName, name, webJobName, id), serviceCallback); + } + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggeredJobHistoryInner object + */ + public Observable getTriggeredWebJobHistoryAsync(String resourceGroupName, String name, String webJobName, String id) { + return getTriggeredWebJobHistoryWithServiceResponseAsync(resourceGroupName, name, webJobName, id).map(new Func1, TriggeredJobHistoryInner>() { + @Override + public TriggeredJobHistoryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggeredJobHistoryInner object + */ + public Observable> getTriggeredWebJobHistoryWithServiceResponseAsync(String resourceGroupName, String name, String webJobName, 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 (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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."); + } + final String apiVersion = "2016-08-01"; + return service.getTriggeredWebJobHistory(resourceGroupName, name, webJobName, id, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTriggeredWebJobHistoryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTriggeredWebJobHistoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Run a triggered web job for an app, or a deployment slot. + * Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void runTriggeredWebJob(String resourceGroupName, String name, String webJobName) { + runTriggeredWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).toBlocking().single().body(); + } + + /** + * Run a triggered web job for an app, or a deployment slot. + * Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture runTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(runTriggeredWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName), serviceCallback); + } + + /** + * Run a triggered web job for an app, or a deployment slot. + * Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable runTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName) { + return runTriggeredWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Run a triggered web job for an app, or a deployment slot. + * Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> runTriggeredWebJobWithServiceResponseAsync(String resourceGroupName, String name, String webJobName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.runTriggeredWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = runTriggeredWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse runTriggeredWebJobDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmUsageQuotaInner> object if successful. + */ + public PagedList listUsages(final String resourceGroupName, final String name) { + ServiceResponse> response = listUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param filter Return only information specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<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.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param filter Return only information specified in the filter (using OData syntax). For 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesAsync(final String resourceGroupName, final String name, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesSinglePageAsync(resourceGroupName, name, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param filter Return only information specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param filter Return only information specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the app. + ServiceResponse> * @param filter Return only information specified in the filter (using OData syntax). For 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]'. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<VnetInfoInner> object if successful. + */ + public List listVnetConnections(String resourceGroupName, String name) { + return listVnetConnectionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listVnetConnectionsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listVnetConnectionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner getVnetConnection(String resourceGroupName, String name, String vnetName) { + return getVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().body(); + } + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getVnetConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); + } + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner createOrUpdateVnetConnection(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + return createOrUpdateVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateVnetConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope), serviceCallback); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteVnetConnection(String resourceGroupName, String name, String vnetName) { + deleteVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().body(); + } + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteVnetConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); + } + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteVnetConnectionAsync(String resourceGroupName, String name, String vnetName) { + return deleteVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner updateVnetConnection(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + return updateVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateVnetConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope), serviceCallback); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets an app's Virtual Network gateway. + * Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VnetGatewayInner object if successful. + */ + public VnetGatewayInner getVnetConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName) { + return getVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).toBlocking().single().body(); + } + + /** + * Gets an app's Virtual Network gateway. + * Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName), serviceCallback); + } + + /** + * Gets an app's Virtual Network gateway. + * Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VnetGatewayInner object + */ + public Observable getVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName) { + return getVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).map(new Func1, VnetGatewayInner>() { + @Override + public VnetGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an app's Virtual Network gateway. + * Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VnetGatewayInner 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the 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().body(); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope), serviceCallback); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the 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().body(); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope), serviceCallback); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<WebJobInner> object if successful. + */ + public PagedList listWebJobs(final String resourceGroupName, final String name) { + ServiceResponse> response = listWebJobsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebJobsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebJobsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebJobsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebJobsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebJobInner> object + */ + public Observable> listWebJobsAsync(final String resourceGroupName, final String name) { + return listWebJobsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebJobInner> object + */ + public Observable>> listWebJobsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listWebJobsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebJobsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebJobsSinglePageAsync(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.listWebJobs(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 = listWebJobsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebJobsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get webjob information for an app, or a deployment slot. + * Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WebJobInner object if successful. + */ + public WebJobInner getWebJob(String resourceGroupName, String name, String webJobName) { + return getWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).toBlocking().single().body(); + } + + /** + * Get webjob information for an app, or a deployment slot. + * Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getWebJobAsync(String resourceGroupName, String name, String webJobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName), serviceCallback); + } + + /** + * Get webjob information for an app, or a deployment slot. + * Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WebJobInner object + */ + public Observable getWebJobAsync(String resourceGroupName, String name, String webJobName) { + return getWebJobWithServiceResponseAsync(resourceGroupName, name, webJobName).map(new Func1, WebJobInner>() { + @Override + public WebJobInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get webjob information for an app, or a deployment slot. + * Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WebJobInner object + */ + public Observable> getWebJobWithServiceResponseAsync(String resourceGroupName, String name, String webJobName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (webJobName == null) { + throw new IllegalArgumentException("Parameter webJobName 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.getWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getWebJobDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all apps for a subscription. + * Get all apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all apps for a subscription. + * Get all apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all apps for a subscription. + * Get all apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all apps for a subscription. + * Get all apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all apps for a subscription. + * Get all apps for a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Gets all web, mobile, and API apps in the specified resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BackupItemInner> object if successful. + */ + public PagedList listBackupsNext(final String nextPageLink) { + ServiceResponse> response = listBackupsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBackupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBackupsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBackupsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBackupsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BackupItemInner> object + */ + public Observable> listBackupsNextAsync(final String nextPageLink) { + return listBackupsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BackupItemInner> object + */ + public Observable>> listBackupsNextWithServiceResponseAsync(final String nextPageLink) { + return listBackupsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBackupsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listBackupsNext(nextUrl, 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBackupsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteConfigResourceInner> object if successful. + */ + public PagedList listConfigurationsNext(final String nextPageLink) { + ServiceResponse> response = listConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listConfigurationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listConfigurationsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listConfigurationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigResourceInner> object + */ + public Observable> listConfigurationsNextAsync(final String nextPageLink) { + return listConfigurationsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigResourceInner> object + */ + public Observable>> listConfigurationsNextWithServiceResponseAsync(final String nextPageLink) { + return listConfigurationsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listConfigurationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteConfigResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listConfigurationsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listConfigurationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConfigurationsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteConfigurationSnapshotInfoInner> object if successful. + */ + public PagedList listConfigurationSnapshotInfoNext(final String nextPageLink) { + ServiceResponse> response = listConfigurationSnapshotInfoNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listConfigurationSnapshotInfoNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listConfigurationSnapshotInfoNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listConfigurationSnapshotInfoNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listConfigurationSnapshotInfoNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigurationSnapshotInfoInner> object + */ + public Observable> listConfigurationSnapshotInfoNextAsync(final String nextPageLink) { + return listConfigurationSnapshotInfoNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigurationSnapshotInfoInner> object + */ + public Observable>> listConfigurationSnapshotInfoNextWithServiceResponseAsync(final String nextPageLink) { + return listConfigurationSnapshotInfoNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listConfigurationSnapshotInfoNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteConfigurationSnapshotInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listConfigurationSnapshotInfoNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listConfigurationSnapshotInfoNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConfigurationSnapshotInfoNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationSnapshotInfoNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContinuousWebJobInner> object if successful. + */ + public PagedList listContinuousWebJobsNext(final String nextPageLink) { + ServiceResponse> response = listContinuousWebJobsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listContinuousWebJobsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listContinuousWebJobsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listContinuousWebJobsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listContinuousWebJobsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContinuousWebJobInner> object + */ + public Observable> listContinuousWebJobsNextAsync(final String nextPageLink) { + return listContinuousWebJobsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContinuousWebJobInner> object + */ + public Observable>> listContinuousWebJobsNextWithServiceResponseAsync(final String nextPageLink) { + return listContinuousWebJobsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listContinuousWebJobsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContinuousWebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listContinuousWebJobsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listContinuousWebJobsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listContinuousWebJobsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listContinuousWebJobsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DeploymentInner> object if successful. + */ + public PagedList listDeploymentsNext(final String nextPageLink) { + ServiceResponse> response = listDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDeploymentsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDeploymentsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDeploymentsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentInner> object + */ + public Observable> listDeploymentsNextAsync(final String nextPageLink) { + return listDeploymentsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentInner> object + */ + public Observable>> listDeploymentsNextWithServiceResponseAsync(final String nextPageLink) { + return listDeploymentsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDeploymentsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDeploymentsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listDeploymentsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDeploymentsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDeploymentsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IdentifierInner> object if successful. + */ + public PagedList listDomainOwnershipIdentifiersNext(final String nextPageLink) { + ServiceResponse> response = listDomainOwnershipIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDomainOwnershipIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDomainOwnershipIdentifiersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDomainOwnershipIdentifiersNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDomainOwnershipIdentifiersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable> listDomainOwnershipIdentifiersNextAsync(final String nextPageLink) { + return listDomainOwnershipIdentifiersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable>> listDomainOwnershipIdentifiersNextWithServiceResponseAsync(final String nextPageLink) { + return listDomainOwnershipIdentifiersNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDomainOwnershipIdentifiersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IdentifierInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDomainOwnershipIdentifiersNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listDomainOwnershipIdentifiersNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDomainOwnershipIdentifiersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDomainOwnershipIdentifiersNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<FunctionEnvelopeInner> object if successful. + */ + public PagedList listFunctionsNext(final String nextPageLink) { + ServiceResponse> response = listFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listFunctionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listFunctionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listFunctionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FunctionEnvelopeInner> object + */ + public Observable> listFunctionsNextAsync(final String nextPageLink) { + return listFunctionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FunctionEnvelopeInner> object + */ + public Observable>> listFunctionsNextWithServiceResponseAsync(final String nextPageLink) { + return listFunctionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listFunctionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FunctionEnvelopeInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listFunctionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listFunctionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listFunctionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listFunctionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<HostNameBindingInner> object if successful. + */ + public PagedList listHostNameBindingsNext(final String nextPageLink) { + ServiceResponse> response = listHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listHostNameBindingsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHostNameBindingsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHostNameBindingsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HostNameBindingInner> object + */ + public Observable> listHostNameBindingsNextAsync(final String nextPageLink) { + return listHostNameBindingsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HostNameBindingInner> object + */ + public Observable>> listHostNameBindingsNextWithServiceResponseAsync(final String nextPageLink) { + return listHostNameBindingsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHostNameBindingsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listHostNameBindingsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listHostNameBindingsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHostNameBindingsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHostNameBindingsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInstanceInner> object if successful. + */ + public PagedList listInstanceIdentifiersNext(final String nextPageLink) { + ServiceResponse> response = listInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceIdentifiersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceIdentifiersNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceIdentifiersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInstanceInner> object + */ + public Observable> listInstanceIdentifiersNextAsync(final String nextPageLink) { + return listInstanceIdentifiersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInstanceInner> object + */ + public Observable>> listInstanceIdentifiersNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceIdentifiersNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceIdentifiersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInstanceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceIdentifiersNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listInstanceIdentifiersNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceIdentifiersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceIdentifiersNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessInfoInner> object if successful. + */ + public PagedList listInstanceProcessesNext(final String nextPageLink) { + ServiceResponse> response = listInstanceProcessesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable> listInstanceProcessesNextAsync(final String nextPageLink) { + return listInstanceProcessesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable>> listInstanceProcessesNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceProcessesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listInstanceProcessesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessModuleInfoInner> object if successful. + */ + public PagedList listInstanceProcessModulesNext(final String nextPageLink) { + ServiceResponse> response = listInstanceProcessModulesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessModulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessModulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessModulesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessModulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable> listInstanceProcessModulesNextAsync(final String nextPageLink) { + return listInstanceProcessModulesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable>> listInstanceProcessModulesNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceProcessModulesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessModulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessModuleInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessModulesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listInstanceProcessModulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessModulesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessModulesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessThreadInfoInner> object if successful. + */ + public PagedList listInstanceProcessThreadsNext(final String nextPageLink) { + ServiceResponse> response = listInstanceProcessThreadsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessThreadsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessThreadsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessThreadsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessThreadsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable> listInstanceProcessThreadsNextAsync(final String nextPageLink) { + return listInstanceProcessThreadsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable>> listInstanceProcessThreadsNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceProcessThreadsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessThreadsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessThreadInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessThreadsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listInstanceProcessThreadsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessThreadsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessThreadsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listMetricDefinitionsNext(final String nextPageLink) { + ServiceResponse> response = listMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricDefinitionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricDefinitionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricDefinitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable> listMetricDefinitionsNextAsync(final String nextPageLink) { + return listMetricDefinitionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable>> listMetricDefinitionsNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricDefinitionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricDefinitionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMetricDefinitionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricDefinitionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricDefinitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMetricsNext(final String nextPageLink) { + ServiceResponse> response = listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMetricsNextAsync(final String nextPageLink) { + return listMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMetricsNext(nextUrl, 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PerfMonResponseInner> object if successful. + */ + public PagedList listPerfMonCountersNext(final String nextPageLink) { + ServiceResponse> response = listPerfMonCountersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPerfMonCountersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPerfMonCountersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPerfMonCountersNextSinglePageAsync(nextPageLink), + 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 nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + public Observable> listPerfMonCountersNextAsync(final String nextPageLink) { + return listPerfMonCountersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + public Observable>> listPerfMonCountersNextWithServiceResponseAsync(final String nextPageLink) { + return listPerfMonCountersNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPerfMonCountersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PerfMonResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPerfMonCountersNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listPerfMonCountersNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPerfMonCountersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPerfMonCountersNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessInfoInner> object if successful. + */ + public PagedList listProcessesNext(final String nextPageLink) { + ServiceResponse> response = listProcessesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable> listProcessesNextAsync(final String nextPageLink) { + return listProcessesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable>> listProcessesNextWithServiceResponseAsync(final String nextPageLink) { + return listProcessesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listProcessesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessModuleInfoInner> object if successful. + */ + public PagedList listProcessModulesNext(final String nextPageLink) { + ServiceResponse> response = listProcessModulesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessModulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessModulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessModulesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessModulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable> listProcessModulesNextAsync(final String nextPageLink) { + return listProcessModulesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable>> listProcessModulesNextWithServiceResponseAsync(final String nextPageLink) { + return listProcessModulesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessModulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessModuleInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessModulesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listProcessModulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessModulesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessModulesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessThreadInfoInner> object if successful. + */ + public PagedList listProcessThreadsNext(final String nextPageLink) { + ServiceResponse> response = listProcessThreadsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessThreadsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessThreadsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessThreadsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessThreadsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable> listProcessThreadsNextAsync(final String nextPageLink) { + return listProcessThreadsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable>> listProcessThreadsNextWithServiceResponseAsync(final String nextPageLink) { + return listProcessThreadsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessThreadsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessThreadInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessThreadsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listProcessThreadsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessThreadsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessThreadsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PublicCertificateInner> object if successful. + */ + public PagedList listPublicCertificatesNext(final String nextPageLink) { + ServiceResponse> response = listPublicCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPublicCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPublicCertificatesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPublicCertificatesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPublicCertificatesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicCertificateInner> object + */ + public Observable> listPublicCertificatesNextAsync(final String nextPageLink) { + return listPublicCertificatesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicCertificateInner> object + */ + public Observable>> listPublicCertificatesNextWithServiceResponseAsync(final String nextPageLink) { + return listPublicCertificatesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPublicCertificatesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicCertificateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPublicCertificatesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listPublicCertificatesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPublicCertificatesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPublicCertificatesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteExtensionInfoInner> object if successful. + */ + public PagedList listSiteExtensionsNext(final String nextPageLink) { + ServiceResponse> response = listSiteExtensionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteExtensionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteExtensionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteExtensionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteExtensionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteExtensionInfoInner> object + */ + public Observable> listSiteExtensionsNextAsync(final String nextPageLink) { + return listSiteExtensionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteExtensionInfoInner> object + */ + public Observable>> listSiteExtensionsNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteExtensionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteExtensionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteExtensionInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteExtensionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSiteExtensionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteExtensionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteExtensionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets an app's deployment slots. + * Gets an app's deployment slots. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listSlotsNext(final String nextPageLink) { + ServiceResponse> response = listSlotsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets an app's deployment slots. + * Gets an app's deployment slots. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSlotsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSlotsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets an app's deployment slots. + * Gets an app's deployment slots. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listSlotsNextAsync(final String nextPageLink) { + return listSlotsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets an app's deployment slots. + * Gets an app's deployment slots. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listSlotsNextWithServiceResponseAsync(final String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSlotsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets an app's deployment slots. + * Gets an app's deployment slots. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSlotsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSlotsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSlotsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSlotsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BackupItemInner> object if successful. + */ + public PagedList listBackupsSlotNext(final String nextPageLink) { + ServiceResponse> response = listBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBackupsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBackupsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBackupsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BackupItemInner> object + */ + public Observable> listBackupsSlotNextAsync(final String nextPageLink) { + return listBackupsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BackupItemInner> object + */ + public Observable>> listBackupsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listBackupsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBackupsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets existing backups of an app. + * Gets existing backups of an app. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BackupItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBackupsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listBackupsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBackupsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBackupsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteConfigResourceInner> object if successful. + */ + public PagedList listConfigurationsSlotNext(final String nextPageLink) { + ServiceResponse> response = listConfigurationsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listConfigurationsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listConfigurationsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listConfigurationsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listConfigurationsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigResourceInner> object + */ + public Observable> listConfigurationsSlotNextAsync(final String nextPageLink) { + return listConfigurationsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigResourceInner> object + */ + public Observable>> listConfigurationsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listConfigurationsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listConfigurationsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the configurations of an app. + * List the configurations of an app. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteConfigResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listConfigurationsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listConfigurationsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConfigurationsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteConfigurationSnapshotInfoInner> object if successful. + */ + public PagedList listConfigurationSnapshotInfoSlotNext(final String nextPageLink) { + ServiceResponse> response = listConfigurationSnapshotInfoSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listConfigurationSnapshotInfoSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listConfigurationSnapshotInfoSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listConfigurationSnapshotInfoSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listConfigurationSnapshotInfoSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigurationSnapshotInfoInner> object + */ + public Observable> listConfigurationSnapshotInfoSlotNextAsync(final String nextPageLink) { + return listConfigurationSnapshotInfoSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteConfigurationSnapshotInfoInner> object + */ + public Observable>> listConfigurationSnapshotInfoSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listConfigurationSnapshotInfoSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listConfigurationSnapshotInfoSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteConfigurationSnapshotInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listConfigurationSnapshotInfoSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listConfigurationSnapshotInfoSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConfigurationSnapshotInfoSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationSnapshotInfoSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContinuousWebJobInner> object if successful. + */ + public PagedList listContinuousWebJobsSlotNext(final String nextPageLink) { + ServiceResponse> response = listContinuousWebJobsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listContinuousWebJobsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listContinuousWebJobsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listContinuousWebJobsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listContinuousWebJobsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContinuousWebJobInner> object + */ + public Observable> listContinuousWebJobsSlotNextAsync(final String nextPageLink) { + return listContinuousWebJobsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContinuousWebJobInner> object + */ + public Observable>> listContinuousWebJobsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listContinuousWebJobsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listContinuousWebJobsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * List continuous web jobs for an app, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContinuousWebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listContinuousWebJobsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listContinuousWebJobsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listContinuousWebJobsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listContinuousWebJobsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DeploymentInner> object if successful. + */ + public PagedList listDeploymentsSlotNext(final String nextPageLink) { + ServiceResponse> response = listDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDeploymentsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDeploymentsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDeploymentsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentInner> object + */ + public Observable> listDeploymentsSlotNextAsync(final String nextPageLink) { + return listDeploymentsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeploymentInner> object + */ + public Observable>> listDeploymentsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listDeploymentsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDeploymentsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List deployments for an app, or a deployment slot. + * List deployments for an app, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDeploymentsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listDeploymentsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDeploymentsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDeploymentsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IdentifierInner> object if successful. + */ + public PagedList listDomainOwnershipIdentifiersSlotNext(final String nextPageLink) { + ServiceResponse> response = listDomainOwnershipIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDomainOwnershipIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDomainOwnershipIdentifiersSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDomainOwnershipIdentifiersSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDomainOwnershipIdentifiersSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable> listDomainOwnershipIdentifiersSlotNextAsync(final String nextPageLink) { + return listDomainOwnershipIdentifiersSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable>> listDomainOwnershipIdentifiersSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listDomainOwnershipIdentifiersSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDomainOwnershipIdentifiersSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Lists ownership identifiers for domain associated with web app. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IdentifierInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDomainOwnershipIdentifiersSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listDomainOwnershipIdentifiersSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDomainOwnershipIdentifiersSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDomainOwnershipIdentifiersSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<FunctionEnvelopeInner> object if successful. + */ + public PagedList listInstanceFunctionsSlotNext(final String nextPageLink) { + ServiceResponse> response = listInstanceFunctionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceFunctionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceFunctionsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceFunctionsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceFunctionsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FunctionEnvelopeInner> object + */ + public Observable> listInstanceFunctionsSlotNextAsync(final String nextPageLink) { + return listInstanceFunctionsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FunctionEnvelopeInner> object + */ + public Observable>> listInstanceFunctionsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceFunctionsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceFunctionsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the functions for a web site, or a deployment slot. + * List the functions for a web site, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FunctionEnvelopeInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceFunctionsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listInstanceFunctionsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceFunctionsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceFunctionsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<HostNameBindingInner> object if successful. + */ + public PagedList listHostNameBindingsSlotNext(final String nextPageLink) { + ServiceResponse> response = listHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listHostNameBindingsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHostNameBindingsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHostNameBindingsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HostNameBindingInner> object + */ + public Observable> listHostNameBindingsSlotNextAsync(final String nextPageLink) { + return listHostNameBindingsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HostNameBindingInner> object + */ + public Observable>> listHostNameBindingsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listHostNameBindingsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHostNameBindingsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Get hostname bindings for an app or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listHostNameBindingsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listHostNameBindingsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHostNameBindingsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHostNameBindingsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteInstanceInner> object if successful. + */ + public PagedList listInstanceIdentifiersSlotNext(final String nextPageLink) { + ServiceResponse> response = listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceIdentifiersSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInstanceInner> object + */ + public Observable> listInstanceIdentifiersSlotNextAsync(final String nextPageLink) { + return listInstanceIdentifiersSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInstanceInner> object + */ + public Observable>> listInstanceIdentifiersSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceIdentifiersSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all scale-out instances of an app. + * Gets all scale-out instances of an app. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInstanceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceIdentifiersSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listInstanceIdentifiersSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceIdentifiersSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceIdentifiersSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessInfoInner> object if successful. + */ + public PagedList listInstanceProcessesSlotNext(final String nextPageLink) { + ServiceResponse> response = listInstanceProcessesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessesSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable> listInstanceProcessesSlotNextAsync(final String nextPageLink) { + return listInstanceProcessesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable>> listInstanceProcessesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceProcessesSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessesSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listInstanceProcessesSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessModuleInfoInner> object if successful. + */ + public PagedList listInstanceProcessModulesSlotNext(final String nextPageLink) { + ServiceResponse> response = listInstanceProcessModulesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessModulesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessModulesSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessModulesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessModulesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable> listInstanceProcessModulesSlotNextAsync(final String nextPageLink) { + return listInstanceProcessModulesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable>> listInstanceProcessModulesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceProcessModulesSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessModulesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessModuleInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessModulesSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listInstanceProcessModulesSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessModulesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessModulesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessThreadInfoInner> object if successful. + */ + public PagedList listInstanceProcessThreadsSlotNext(final String nextPageLink) { + ServiceResponse> response = listInstanceProcessThreadsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceProcessThreadsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInstanceProcessThreadsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInstanceProcessThreadsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceProcessThreadsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable> listInstanceProcessThreadsSlotNextAsync(final String nextPageLink) { + return listInstanceProcessThreadsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable>> listInstanceProcessThreadsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceProcessThreadsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceProcessThreadsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessThreadInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceProcessThreadsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listInstanceProcessThreadsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessThreadsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessThreadsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricDefinitionInner> object if successful. + */ + public PagedList listMetricDefinitionsSlotNext(final String nextPageLink) { + ServiceResponse> response = listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricDefinitionsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable> listMetricDefinitionsSlotNextAsync(final String nextPageLink) { + return listMetricDefinitionsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricDefinitionInner> object + */ + public Observable>> listMetricDefinitionsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricDefinitionsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all metric definitions of an app (or deployment slot, if specified). + * Gets all metric definitions of an app (or deployment slot, if specified). + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricDefinitionsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMetricDefinitionsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricDefinitionsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricDefinitionsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMetricsSlotNext(final String nextPageLink) { + ServiceResponse> response = listMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMetricsSlotNextAsync(final String nextPageLink) { + return listMetricsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMetricsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets performance metrics of an app (or deployment slot, if specified). + * Gets performance metrics of an app (or deployment slot, if specified). + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listMetricsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PerfMonResponseInner> object if successful. + */ + public PagedList listPerfMonCountersSlotNext(final String nextPageLink) { + ServiceResponse> response = listPerfMonCountersSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPerfMonCountersSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPerfMonCountersSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + public Observable> listPerfMonCountersSlotNextAsync(final String nextPageLink) { + return listPerfMonCountersSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + public Observable>> listPerfMonCountersSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPerfMonCountersSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PerfMonResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPerfMonCountersSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listPerfMonCountersSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPerfMonCountersSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPerfMonCountersSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessInfoInner> object if successful. + */ + public PagedList listProcessesSlotNext(final String nextPageLink) { + ServiceResponse> response = listProcessesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessesSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable> listProcessesSlotNextAsync(final String nextPageLink) { + return listProcessesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessInfoInner> object + */ + public Observable>> listProcessesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listProcessesSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessesSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listProcessesSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessModuleInfoInner> object if successful. + */ + public PagedList listProcessModulesSlotNext(final String nextPageLink) { + ServiceResponse> response = listProcessModulesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessModulesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessModulesSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessModulesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessModulesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable> listProcessModulesSlotNextAsync(final String nextPageLink) { + return listProcessModulesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessModuleInfoInner> object + */ + public Observable>> listProcessModulesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listProcessModulesSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessModulesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessModuleInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessModulesSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listProcessModulesSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessModulesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessModulesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProcessThreadInfoInner> object if successful. + */ + public PagedList listProcessThreadsSlotNext(final String nextPageLink) { + ServiceResponse> response = listProcessThreadsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProcessThreadsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProcessThreadsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProcessThreadsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProcessThreadsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable> listProcessThreadsSlotNextAsync(final String nextPageLink) { + return listProcessThreadsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProcessThreadInfoInner> object + */ + public Observable>> listProcessThreadsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listProcessThreadsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProcessThreadsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProcessThreadInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProcessThreadsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listProcessThreadsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessThreadsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessThreadsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PublicCertificateInner> object if successful. + */ + public PagedList listPublicCertificatesSlotNext(final String nextPageLink) { + ServiceResponse> response = listPublicCertificatesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPublicCertificatesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPublicCertificatesSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPublicCertificatesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPublicCertificatesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicCertificateInner> object + */ + public Observable> listPublicCertificatesSlotNextAsync(final String nextPageLink) { + return listPublicCertificatesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PublicCertificateInner> object + */ + public Observable>> listPublicCertificatesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listPublicCertificatesSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPublicCertificatesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get public certificates for an app or a deployment slot. + * Get public certificates for an app or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PublicCertificateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPublicCertificatesSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listPublicCertificatesSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPublicCertificatesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPublicCertificatesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SiteExtensionInfoInner> object if successful. + */ + public PagedList listSiteExtensionsSlotNext(final String nextPageLink) { + ServiceResponse> response = listSiteExtensionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteExtensionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteExtensionsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteExtensionsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteExtensionsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteExtensionInfoInner> object + */ + public Observable> listSiteExtensionsSlotNextAsync(final String nextPageLink) { + return listSiteExtensionsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteExtensionInfoInner> object + */ + public Observable>> listSiteExtensionsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteExtensionsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteExtensionsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Get list of siteextensions for a web site, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteExtensionInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteExtensionsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSiteExtensionsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteExtensionsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteExtensionsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, 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 nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SlotDifferenceInner> object if successful. + */ + public PagedList listSlotDifferencesSlotNext(final String nextPageLink) { + ServiceResponse> response = listSlotDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSlotDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSlotDifferencesSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSlotDifferencesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSlotDifferencesSlotNextSinglePageAsync(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 nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SlotDifferenceInner> object + */ + public Observable> listSlotDifferencesSlotNextAsync(final String nextPageLink) { + return listSlotDifferencesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SlotDifferenceInner> object + */ + public Observable>> listSlotDifferencesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listSlotDifferencesSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSlotDifferencesSlotNextWithServiceResponseAsync(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 nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSlotDifferencesSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSlotDifferencesSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSlotDifferencesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSlotDifferencesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SnapshotInner> object if successful. + */ + public PagedList listSnapshotsSlotNext(final String nextPageLink) { + ServiceResponse> response = listSnapshotsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSnapshotsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSnapshotsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSnapshotsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSnapshotsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SnapshotInner> object + */ + public Observable> listSnapshotsSlotNextAsync(final String nextPageLink) { + return listSnapshotsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SnapshotInner> object + */ + public Observable>> listSnapshotsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listSnapshotsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSnapshotsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SnapshotInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSnapshotsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSnapshotsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSnapshotsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TriggeredWebJobInner> object if successful. + */ + public PagedList listTriggeredWebJobsSlotNext(final String nextPageLink) { + ServiceResponse> response = listTriggeredWebJobsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTriggeredWebJobsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTriggeredWebJobsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTriggeredWebJobsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTriggeredWebJobsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredWebJobInner> object + */ + public Observable> listTriggeredWebJobsSlotNextAsync(final String nextPageLink) { + return listTriggeredWebJobsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredWebJobInner> object + */ + public Observable>> listTriggeredWebJobsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listTriggeredWebJobsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTriggeredWebJobsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TriggeredWebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTriggeredWebJobsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listTriggeredWebJobsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTriggeredWebJobsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TriggeredJobHistoryInner> object if successful. + */ + public PagedList listTriggeredWebJobHistorySlotNext(final String nextPageLink) { + ServiceResponse> response = listTriggeredWebJobHistorySlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTriggeredWebJobHistorySlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTriggeredWebJobHistorySlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTriggeredWebJobHistorySlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTriggeredWebJobHistorySlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredJobHistoryInner> object + */ + public Observable> listTriggeredWebJobHistorySlotNextAsync(final String nextPageLink) { + return listTriggeredWebJobHistorySlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredJobHistoryInner> object + */ + public Observable>> listTriggeredWebJobHistorySlotNextWithServiceResponseAsync(final String nextPageLink) { + return listTriggeredWebJobHistorySlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTriggeredWebJobHistorySlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TriggeredJobHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTriggeredWebJobHistorySlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listTriggeredWebJobHistorySlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTriggeredWebJobHistorySlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobHistorySlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmUsageQuotaInner> object if successful. + */ + public PagedList listUsagesSlotNext(final String nextPageLink) { + ServiceResponse> response = listUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable> listUsagesSlotNextAsync(final String nextPageLink) { + return listUsagesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable>> listUsagesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listUsagesSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listUsagesSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<WebJobInner> object if successful. + */ + public PagedList listWebJobsSlotNext(final String nextPageLink) { + ServiceResponse> response = listWebJobsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebJobsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebJobsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebJobsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebJobsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebJobInner> object + */ + public Observable> listWebJobsSlotNextAsync(final String nextPageLink) { + return listWebJobsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebJobInner> object + */ + public Observable>> listWebJobsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listWebJobsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebJobsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebJobsSlotNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWebJobsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebJobsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebJobsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SlotDifferenceInner> object if successful. + */ + public PagedList listSlotDifferencesFromProductionNext(final String nextPageLink) { + ServiceResponse> response = listSlotDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSlotDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSlotDifferencesFromProductionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSlotDifferencesFromProductionNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSlotDifferencesFromProductionNextSinglePageAsync(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 nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SlotDifferenceInner> object + */ + public Observable> listSlotDifferencesFromProductionNextAsync(final String nextPageLink) { + return listSlotDifferencesFromProductionNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SlotDifferenceInner> object + */ + public Observable>> listSlotDifferencesFromProductionNextWithServiceResponseAsync(final String nextPageLink) { + return listSlotDifferencesFromProductionNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSlotDifferencesFromProductionNextWithServiceResponseAsync(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 nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSlotDifferencesFromProductionNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSlotDifferencesFromProductionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSlotDifferencesFromProductionNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSlotDifferencesFromProductionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SnapshotInner> object if successful. + */ + public PagedList listSnapshotsNext(final String nextPageLink) { + ServiceResponse> response = listSnapshotsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSnapshotsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSnapshotsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSnapshotsNextSinglePageAsync(nextPageLink), + 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 nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SnapshotInner> object + */ + public Observable> listSnapshotsNextAsync(final String nextPageLink) { + return listSnapshotsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SnapshotInner> object + */ + public Observable>> listSnapshotsNextWithServiceResponseAsync(final String nextPageLink) { + return listSnapshotsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSnapshotsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SnapshotInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSnapshotsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSnapshotsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSnapshotsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TriggeredWebJobInner> object if successful. + */ + public PagedList listTriggeredWebJobsNext(final String nextPageLink) { + ServiceResponse> response = listTriggeredWebJobsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTriggeredWebJobsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTriggeredWebJobsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTriggeredWebJobsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTriggeredWebJobsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredWebJobInner> object + */ + public Observable> listTriggeredWebJobsNextAsync(final String nextPageLink) { + return listTriggeredWebJobsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredWebJobInner> object + */ + public Observable>> listTriggeredWebJobsNextWithServiceResponseAsync(final String nextPageLink) { + return listTriggeredWebJobsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTriggeredWebJobsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * List triggered web jobs for an app, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TriggeredWebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTriggeredWebJobsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listTriggeredWebJobsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTriggeredWebJobsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<TriggeredJobHistoryInner> object if successful. + */ + public PagedList listTriggeredWebJobHistoryNext(final String nextPageLink) { + ServiceResponse> response = listTriggeredWebJobHistoryNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTriggeredWebJobHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTriggeredWebJobHistoryNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTriggeredWebJobHistoryNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTriggeredWebJobHistoryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredJobHistoryInner> object + */ + public Observable> listTriggeredWebJobHistoryNextAsync(final String nextPageLink) { + return listTriggeredWebJobHistoryNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TriggeredJobHistoryInner> object + */ + public Observable>> listTriggeredWebJobHistoryNextWithServiceResponseAsync(final String nextPageLink) { + return listTriggeredWebJobHistoryNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTriggeredWebJobHistoryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * List a triggered web job's history for an app, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TriggeredJobHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTriggeredWebJobHistoryNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listTriggeredWebJobHistoryNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTriggeredWebJobHistoryNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobHistoryNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CsmUsageQuotaInner> object if successful. + */ + public PagedList listUsagesNext(final String nextPageLink) { + ServiceResponse> response = listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUsagesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listUsagesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable> listUsagesNextAsync(final String nextPageLink) { + return listUsagesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable>> listUsagesNextWithServiceResponseAsync(final String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Gets the quota usage information of an app (or deployment slot, if specified). + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listUsagesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listUsagesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<WebJobInner> object if successful. + */ + public PagedList listWebJobsNext(final String nextPageLink) { + ServiceResponse> response = listWebJobsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebJobsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listWebJobsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listWebJobsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebJobsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebJobInner> object + */ + public Observable> listWebJobsNextAsync(final String nextPageLink) { + return listWebJobsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WebJobInner> object + */ + public Observable>> listWebJobsNextWithServiceResponseAsync(final String nextPageLink) { + return listWebJobsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebJobsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List webjobs for an app, or a deployment slot. + * List webjobs for an app, or a deployment slot. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WebJobInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebJobsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listWebJobsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebJobsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebJobsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WebJobInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WebJobInner.java new file mode 100644 index 00000000000..6747bb71129 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WebJobInner.java @@ -0,0 +1,219 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.WebJobType; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Web Job Information. + */ +@JsonFlatten +public class WebJobInner extends ProxyOnlyResource { + /** + * Job name. Used as job identifier in ARM resource URI. + */ + @JsonProperty(value = "properties.name", access = JsonProperty.Access.WRITE_ONLY) + private String webJobName; + + /** + * Run command. + */ + @JsonProperty(value = "properties.runCommand") + private String runCommand; + + /** + * Job URL. + */ + @JsonProperty(value = "properties.url") + private String url; + + /** + * Extra Info URL. + */ + @JsonProperty(value = "properties.extraInfoUrl") + private String extraInfoUrl; + + /** + * Job type. Possible values include: 'Continuous', 'Triggered'. + */ + @JsonProperty(value = "properties.jobType") + private WebJobType jobType; + + /** + * Error information. + */ + @JsonProperty(value = "properties.error") + private String error; + + /** + * Using SDK?. + */ + @JsonProperty(value = "properties.usingSdk") + private Boolean usingSdk; + + /** + * Job settings. + */ + @JsonProperty(value = "properties.settings") + private Map settings; + + /** + * Get the webJobName value. + * + * @return the webJobName value + */ + public String webJobName() { + return this.webJobName; + } + + /** + * Get the runCommand value. + * + * @return the runCommand value + */ + public String runCommand() { + return this.runCommand; + } + + /** + * Set the runCommand value. + * + * @param runCommand the runCommand value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withRunCommand(String runCommand) { + this.runCommand = runCommand; + return this; + } + + /** + * Get the url value. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set the url value. + * + * @param url the url value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the extraInfoUrl value. + * + * @return the extraInfoUrl value + */ + public String extraInfoUrl() { + return this.extraInfoUrl; + } + + /** + * Set the extraInfoUrl value. + * + * @param extraInfoUrl the extraInfoUrl value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withExtraInfoUrl(String extraInfoUrl) { + this.extraInfoUrl = extraInfoUrl; + return this; + } + + /** + * Get the jobType value. + * + * @return the jobType value + */ + public WebJobType jobType() { + return this.jobType; + } + + /** + * Set the jobType value. + * + * @param jobType the jobType value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withJobType(WebJobType jobType) { + this.jobType = jobType; + return this; + } + + /** + * Get the error value. + * + * @return the error value + */ + public String error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withError(String error) { + this.error = error; + return this; + } + + /** + * Get the usingSdk value. + * + * @return the usingSdk value + */ + public Boolean usingSdk() { + return this.usingSdk; + } + + /** + * Set the usingSdk value. + * + * @param usingSdk the usingSdk value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withUsingSdk(Boolean usingSdk) { + this.usingSdk = usingSdk; + return this; + } + + /** + * Get the settings value. + * + * @return the settings value + */ + public Map settings() { + return this.settings; + } + + /** + * Set the settings value. + * + * @param settings the settings value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withSettings(Map settings) { + this.settings = settings; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WebSiteManagementClientImpl.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WebSiteManagementClientImpl.java new file mode 100644 index 00000000000..460b5c54876 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WebSiteManagementClientImpl.java @@ -0,0 +1,2590 @@ +/** + * 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.web.implementation; + +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.web.CheckNameResourceTypes; +import com.microsoft.azure.management.web.ResourceNameAvailabilityRequest; +import com.microsoft.azure.management.web.SkuName; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * Initializes a new instance of the WebSiteManagementClientImpl class. + */ +public 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; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */ + private String subscriptionId; + + /** + * Gets Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public WebSiteManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** Gets or sets the preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets Gets or sets the preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets Gets or sets the preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public WebSiteManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public WebSiteManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public WebSiteManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The AppServiceCertificateOrdersInner object to access its operations. + */ + private AppServiceCertificateOrdersInner appServiceCertificateOrders; + + /** + * Gets the AppServiceCertificateOrdersInner object to access its operations. + * @return the AppServiceCertificateOrdersInner object. + */ + public AppServiceCertificateOrdersInner appServiceCertificateOrders() { + return this.appServiceCertificateOrders; + } + + /** + * The CertificateRegistrationProvidersInner object to access its operations. + */ + private CertificateRegistrationProvidersInner certificateRegistrationProviders; + + /** + * Gets the CertificateRegistrationProvidersInner object to access its operations. + * @return the CertificateRegistrationProvidersInner object. + */ + public CertificateRegistrationProvidersInner certificateRegistrationProviders() { + return this.certificateRegistrationProviders; + } + + /** + * The DomainsInner object to access its operations. + */ + private DomainsInner domains; + + /** + * Gets the DomainsInner object to access its operations. + * @return the DomainsInner object. + */ + public DomainsInner domains() { + return this.domains; + } + + /** + * The TopLevelDomainsInner object to access its operations. + */ + private TopLevelDomainsInner topLevelDomains; + + /** + * Gets the TopLevelDomainsInner object to access its operations. + * @return the TopLevelDomainsInner object. + */ + public TopLevelDomainsInner topLevelDomains() { + return this.topLevelDomains; + } + + /** + * The DomainRegistrationProvidersInner object to access its operations. + */ + private DomainRegistrationProvidersInner domainRegistrationProviders; + + /** + * Gets the DomainRegistrationProvidersInner object to access its operations. + * @return the DomainRegistrationProvidersInner object. + */ + public DomainRegistrationProvidersInner domainRegistrationProviders() { + return this.domainRegistrationProviders; + } + + /** + * 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; + } + + /** + * The DeletedWebAppsInner object to access its operations. + */ + private DeletedWebAppsInner deletedWebApps; + + /** + * Gets the DeletedWebAppsInner object to access its operations. + * @return the DeletedWebAppsInner object. + */ + public DeletedWebAppsInner deletedWebApps() { + return this.deletedWebApps; + } + + /** + * The DiagnosticsInner object to access its operations. + */ + private DiagnosticsInner diagnostics; + + /** + * Gets the DiagnosticsInner object to access its operations. + * @return the DiagnosticsInner object. + */ + public DiagnosticsInner diagnostics() { + return this.diagnostics; + } + + /** + * The ProvidersInner object to access its operations. + */ + private ProvidersInner providers; + + /** + * Gets the ProvidersInner object to access its operations. + * @return the ProvidersInner object. + */ + public ProvidersInner providers() { + return this.providers; + } + + /** + * The RecommendationsInner object to access its operations. + */ + private RecommendationsInner recommendations; + + /** + * Gets the RecommendationsInner object to access its operations. + * @return the RecommendationsInner object. + */ + public RecommendationsInner recommendations() { + return this.recommendations; + } + + /** + * The WebAppsInner object to access its operations. + */ + private WebAppsInner webApps; + + /** + * Gets the WebAppsInner object to access its operations. + * @return the WebAppsInner object. + */ + public WebAppsInner webApps() { + return this.webApps; + } + + /** + * The AppServiceEnvironmentsInner object to access its operations. + */ + private AppServiceEnvironmentsInner appServiceEnvironments; + + /** + * Gets the AppServiceEnvironmentsInner object to access its operations. + * @return the AppServiceEnvironmentsInner object. + */ + public AppServiceEnvironmentsInner appServiceEnvironments() { + return this.appServiceEnvironments; + } + + /** + * The AppServicePlansInner object to access its operations. + */ + private AppServicePlansInner appServicePlans; + + /** + * Gets the AppServicePlansInner object to access its operations. + * @return the AppServicePlansInner object. + */ + public AppServicePlansInner appServicePlans() { + return this.appServicePlans; + } + + /** + * Initializes an instance of WebSiteManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public WebSiteManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of WebSiteManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public WebSiteManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of WebSiteManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + 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.certificateRegistrationProviders = new CertificateRegistrationProvidersInner(restClient().retrofit(), this); + this.domains = new DomainsInner(restClient().retrofit(), this); + this.topLevelDomains = new TopLevelDomainsInner(restClient().retrofit(), this); + this.domainRegistrationProviders = new DomainRegistrationProvidersInner(restClient().retrofit(), this); + this.certificates = new CertificatesInner(restClient().retrofit(), this); + this.deletedWebApps = new DeletedWebAppsInner(restClient().retrofit(), this); + this.diagnostics = new DiagnosticsInner(restClient().retrofit(), this); + this.providers = new ProvidersInner(restClient().retrofit(), this); + this.recommendations = new RecommendationsInner(restClient().retrofit(), this); + this.webApps = new WebAppsInner(restClient().retrofit(), this); + this.appServiceEnvironments = new AppServiceEnvironmentsInner(restClient().retrofit(), this); + this.appServicePlans = new AppServicePlansInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + initializeService(); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s)", super.userAgent(), "WebSiteManagementClient"); + } + + private void initializeService() { + service = restClient().retrofit().create(WebSiteManagementClientService.class); + } + + /** + * The interface defining all the services for WebSiteManagementClient to be + * used by Retrofit to perform actually REST calls. + */ + interface WebSiteManagementClientService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient getPublishingUser" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient updatePublishingUser" }) + @PUT("providers/Microsoft.Web/publishingUsers/web") + Observable> updatePublishingUser(@Body UserInner userDetails, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient listSourceControls" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient getSourceControl" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient updateSourceControl" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ResourceNameAvailabilityRequest request, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient getSubscriptionDeploymentLocations" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations") + Observable> getSubscriptionDeploymentLocations(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient listGeoRegions" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") + Observable> listGeoRegions(@Path("subscriptionId") String subscriptionId, @Query("sku") SkuName sku, @Query("linuxWorkersEnabled") Boolean linuxWorkersEnabled, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient listSiteIdentifiersAssignedToHostName" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName") + Observable> listSiteIdentifiersAssignedToHostName(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body NameIdentifierInner nameIdentifier, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient listPremierAddOnOffers" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient listSkus" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient verifyHostingEnvironmentVnet" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") + Observable> verifyHostingEnvironmentVnet(@Path("subscriptionId") String subscriptionId, @Body VnetParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient move" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") + Observable> move(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient validate" }) + @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", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient validateMove" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") + Observable> validateMove(@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", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient listSourceControlsNext" }) + @GET + Observable> listSourceControlsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient listGeoRegionsNext" }) + @GET + Observable> listGeoRegionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient listSiteIdentifiersAssignedToHostNameNext" }) + @GET + Observable> listSiteIdentifiersAssignedToHostNameNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.web.WebSiteManagementClient listPremierAddOnOffersNext" }) + @GET + Observable> listPremierAddOnOffersNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets publishing user. + * Gets publishing user. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the UserInner object if successful. + */ + public UserInner getPublishingUser() { + return getPublishingUserWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Gets publishing user. + * Gets publishing user. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getPublishingUserAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPublishingUserWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets publishing user. + * Gets publishing user. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the UserInner object + */ + public Observable getPublishingUserAsync() { + return getPublishingUserWithServiceResponseAsync().map(new Func1, UserInner>() { + @Override + public UserInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets publishing user. + * Gets publishing user. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the UserInner object + */ + public Observable> getPublishingUserWithServiceResponseAsync() { + final String apiVersion = "2016-03-01"; + return service.getPublishingUser(apiVersion, this.acceptLanguage(), this.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 { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates publishing user. + * Updates publishing user. + * + * @param userDetails Details of publishing user + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the UserInner object if successful. + */ + public UserInner updatePublishingUser(UserInner userDetails) { + return updatePublishingUserWithServiceResponseAsync(userDetails).toBlocking().single().body(); + } + + /** + * Updates publishing user. + * Updates publishing user. + * + * @param userDetails Details of publishing user + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updatePublishingUserAsync(UserInner userDetails, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updatePublishingUserWithServiceResponseAsync(userDetails), serviceCallback); + } + + /** + * Updates publishing user. + * Updates publishing user. + * + * @param userDetails Details of publishing user + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the UserInner object + */ + public Observable updatePublishingUserAsync(UserInner userDetails) { + return updatePublishingUserWithServiceResponseAsync(userDetails).map(new Func1, UserInner>() { + @Override + public UserInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates publishing user. + * Updates publishing user. + * + * @param userDetails Details of publishing user + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the UserInner object + */ + public Observable> updatePublishingUserWithServiceResponseAsync(UserInner userDetails) { + if (userDetails == null) { + throw new IllegalArgumentException("Parameter userDetails is required and cannot be null."); + } + Validator.validate(userDetails); + final String apiVersion = "2016-03-01"; + return service.updatePublishingUser(userDetails, apiVersion, this.acceptLanguage(), this.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 this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .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. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SourceControlInner> object if successful. + */ + public PagedList listSourceControls() { + ServiceResponse> response = listSourceControlsSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSourceControlsAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSourceControlsSinglePageAsync(), + 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. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SourceControlInner> object + */ + public Observable> listSourceControlsAsync() { + return listSourceControlsWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SourceControlInner> object + */ + public Observable>> listSourceControlsWithServiceResponseAsync() { + return listSourceControlsSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSourceControlsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SourceControlInner> object wrapped in {@link ServiceResponse} if successful. + */ + 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSourceControlsDelegate(Response response) throws CloudException, IOException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets source control token. + * Gets source control token. + * + * @param sourceControlType Type of source control + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SourceControlInner object if successful. + */ + public SourceControlInner getSourceControl(String sourceControlType) { + return getSourceControlWithServiceResponseAsync(sourceControlType).toBlocking().single().body(); + } + + /** + * Gets source control token. + * Gets source control token. + * + * @param sourceControlType Type of source control + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSourceControlAsync(String sourceControlType, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSourceControlWithServiceResponseAsync(sourceControlType), serviceCallback); + } + + /** + * Gets source control token. + * Gets source control token. + * + * @param sourceControlType Type of source control + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Gets source control token. + * Gets source control token. + * + * @param sourceControlType Type of source control + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + final String apiVersion = "2016-03-01"; + return service.getSourceControl(sourceControlType, apiVersion, this.acceptLanguage(), this.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 this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates source control token. + * Updates source control token. + * + * @param sourceControlType Type of source control + * @param requestMessage Source control token information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SourceControlInner object if successful. + */ + public SourceControlInner updateSourceControl(String sourceControlType, SourceControlInner requestMessage) { + return updateSourceControlWithServiceResponseAsync(sourceControlType, requestMessage).toBlocking().single().body(); + } + + /** + * Updates source control token. + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateSourceControlAsync(String sourceControlType, SourceControlInner requestMessage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSourceControlWithServiceResponseAsync(sourceControlType, requestMessage), serviceCallback); + } + + /** + * Updates source control token. + * Updates source control token. + * + * @param sourceControlType Type of source control + * @param requestMessage Source control token information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Updates source control token. + * Updates source control token. + * + * @param sourceControlType Type of source control + * @param requestMessage Source control token information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + Validator.validate(requestMessage); + final String apiVersion = "2016-03-01"; + return service.updateSourceControl(sourceControlType, requestMessage, apiVersion, this.acceptLanguage(), this.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 this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Check if a resource name is available. + * Check if a resource name is available. + * + * @param name Resource name to verify. + * @param type Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ResourceNameAvailabilityInner object if successful. + */ + public ResourceNameAvailabilityInner checkNameAvailability(String name, CheckNameResourceTypes type) { + return checkNameAvailabilityWithServiceResponseAsync(name, type).toBlocking().single().body(); + } + + /** + * Check if a resource name is available. + * Check if a resource name is available. + * + * @param name Resource name to verify. + * @param type Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkNameAvailabilityAsync(String name, CheckNameResourceTypes type, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(name, type), serviceCallback); + } + + /** + * Check if a resource name is available. + * Check if a resource name is available. + * + * @param name Resource name to verify. + * @param type Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResourceNameAvailabilityInner object + */ + public Observable checkNameAvailabilityAsync(String name, CheckNameResourceTypes type) { + return checkNameAvailabilityWithServiceResponseAsync(name, type).map(new Func1, ResourceNameAvailabilityInner>() { + @Override + public ResourceNameAvailabilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check if a resource name is available. + * Check if a resource name is available. + * + * @param name Resource name to verify. + * @param type Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResourceNameAvailabilityInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String name, CheckNameResourceTypes type) { + 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."); + } + if (type == null) { + throw new IllegalArgumentException("Parameter type is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + final Boolean isFqdn = null; + ResourceNameAvailabilityRequest request = new ResourceNameAvailabilityRequest(); + request.withName(name); + request.withType(type); + request.withIsFqdn(null); + return service.checkNameAvailability(this.subscriptionId(), apiVersion, this.acceptLanguage(), request, 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); + } + } + }); + } + + /** + * Check if a resource name is available. + * Check if a resource name is available. + * + * @param name Resource name to verify. + * @param type Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' + * @param isFqdn Is fully qualified domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ResourceNameAvailabilityInner object if successful. + */ + public ResourceNameAvailabilityInner checkNameAvailability(String name, CheckNameResourceTypes type, Boolean isFqdn) { + return checkNameAvailabilityWithServiceResponseAsync(name, type, isFqdn).toBlocking().single().body(); + } + + /** + * Check if a resource name is available. + * Check if a resource name is available. + * + * @param name Resource name to verify. + * @param type Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' + * @param isFqdn Is fully qualified domain name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkNameAvailabilityAsync(String name, CheckNameResourceTypes type, Boolean isFqdn, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(name, type, isFqdn), serviceCallback); + } + + /** + * Check if a resource name is available. + * Check if a resource name is available. + * + * @param name Resource name to verify. + * @param type Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' + * @param isFqdn Is fully qualified domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResourceNameAvailabilityInner object + */ + public Observable checkNameAvailabilityAsync(String name, CheckNameResourceTypes type, Boolean isFqdn) { + return checkNameAvailabilityWithServiceResponseAsync(name, type, isFqdn).map(new Func1, ResourceNameAvailabilityInner>() { + @Override + public ResourceNameAvailabilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check if a resource name is available. + * Check if a resource name is available. + * + * @param name Resource name to verify. + * @param type Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' + * @param isFqdn Is fully qualified domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResourceNameAvailabilityInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String name, CheckNameResourceTypes type, Boolean isFqdn) { + 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."); + } + if (type == null) { + throw new IllegalArgumentException("Parameter type is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + ResourceNameAvailabilityRequest request = new ResourceNameAvailabilityRequest(); + request.withName(name); + request.withType(type); + request.withIsFqdn(isFqdn); + return service.checkNameAvailability(this.subscriptionId(), apiVersion, this.acceptLanguage(), request, 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 this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets list of available geo regions plus ministamps. + * Gets list of available geo regions plus ministamps. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DeploymentLocationsInner object if successful. + */ + public DeploymentLocationsInner getSubscriptionDeploymentLocations() { + return getSubscriptionDeploymentLocationsWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Gets list of available geo regions plus ministamps. + * Gets list of available geo regions plus ministamps. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSubscriptionDeploymentLocationsAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSubscriptionDeploymentLocationsWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets list of available geo regions plus ministamps. + * Gets list of available geo regions plus ministamps. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentLocationsInner object + */ + public Observable getSubscriptionDeploymentLocationsAsync() { + return getSubscriptionDeploymentLocationsWithServiceResponseAsync().map(new Func1, DeploymentLocationsInner>() { + @Override + public DeploymentLocationsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets list of available geo regions plus ministamps. + * Gets list of available geo regions plus ministamps. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeploymentLocationsInner object + */ + public Observable> getSubscriptionDeploymentLocationsWithServiceResponseAsync() { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.getSubscriptionDeploymentLocations(this.subscriptionId(), apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSubscriptionDeploymentLocationsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSubscriptionDeploymentLocationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GeoRegionInner> object if successful. + */ + public PagedList listGeoRegions() { + ServiceResponse> response = listGeoRegionsSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listGeoRegionsAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGeoRegionsSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGeoRegionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GeoRegionInner> object + */ + public Observable> listGeoRegionsAsync() { + return listGeoRegionsWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GeoRegionInner> object + */ + public Observable>> listGeoRegionsWithServiceResponseAsync() { + return listGeoRegionsSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listGeoRegionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GeoRegionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGeoRegionsSinglePageAsync() { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + final SkuName sku = null; + final Boolean linuxWorkersEnabled = null; + return service.listGeoRegions(this.subscriptionId(), sku, linuxWorkersEnabled, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGeoRegionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @param sku Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', 'Dynamic', 'Isolated' + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux workers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GeoRegionInner> object if successful. + */ + public PagedList listGeoRegions(final SkuName sku, final Boolean linuxWorkersEnabled) { + ServiceResponse> response = listGeoRegionsSinglePageAsync(sku, linuxWorkersEnabled).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @param sku Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', 'Dynamic', 'Isolated' + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux workers. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listGeoRegionsAsync(final SkuName sku, final Boolean linuxWorkersEnabled, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGeoRegionsSinglePageAsync(sku, linuxWorkersEnabled), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGeoRegionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @param sku Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', 'Dynamic', 'Isolated' + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux workers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GeoRegionInner> object + */ + public Observable> listGeoRegionsAsync(final SkuName sku, final Boolean linuxWorkersEnabled) { + return listGeoRegionsWithServiceResponseAsync(sku, linuxWorkersEnabled) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @param sku Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', 'Dynamic', 'Isolated' + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux workers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GeoRegionInner> object + */ + public Observable>> listGeoRegionsWithServiceResponseAsync(final SkuName sku, final Boolean linuxWorkersEnabled) { + return listGeoRegionsSinglePageAsync(sku, linuxWorkersEnabled) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listGeoRegionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + ServiceResponse> * @param sku Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', 'Dynamic', 'Isolated' + ServiceResponse> * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux workers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GeoRegionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGeoRegionsSinglePageAsync(final SkuName sku, final Boolean linuxWorkersEnabled) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.listGeoRegions(this.subscriptionId(), sku, linuxWorkersEnabled, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGeoRegionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGeoRegionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IdentifierInner> object if successful. + */ + public PagedList listSiteIdentifiersAssignedToHostName() { + ServiceResponse> response = listSiteIdentifiersAssignedToHostNameSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteIdentifiersAssignedToHostNameNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteIdentifiersAssignedToHostNameAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteIdentifiersAssignedToHostNameSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteIdentifiersAssignedToHostNameNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable> listSiteIdentifiersAssignedToHostNameAsync() { + return listSiteIdentifiersAssignedToHostNameWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable>> listSiteIdentifiersAssignedToHostNameWithServiceResponseAsync() { + return listSiteIdentifiersAssignedToHostNameSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteIdentifiersAssignedToHostNameNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IdentifierInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteIdentifiersAssignedToHostNameSinglePageAsync() { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + final String name = null; + NameIdentifierInner nameIdentifier = new NameIdentifierInner(); + nameIdentifier.withName(null); + return service.listSiteIdentifiersAssignedToHostName(this.subscriptionId(), apiVersion, this.acceptLanguage(), nameIdentifier, this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteIdentifiersAssignedToHostNameDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IdentifierInner> object if successful. + */ + public PagedList listSiteIdentifiersAssignedToHostName(final String name) { + ServiceResponse> response = listSiteIdentifiersAssignedToHostNameSinglePageAsync(name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteIdentifiersAssignedToHostNameNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @param name Name of the object. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteIdentifiersAssignedToHostNameAsync(final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteIdentifiersAssignedToHostNameSinglePageAsync(name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteIdentifiersAssignedToHostNameNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable> listSiteIdentifiersAssignedToHostNameAsync(final String name) { + return listSiteIdentifiersAssignedToHostNameWithServiceResponseAsync(name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable>> listSiteIdentifiersAssignedToHostNameWithServiceResponseAsync(final String name) { + return listSiteIdentifiersAssignedToHostNameSinglePageAsync(name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteIdentifiersAssignedToHostNameNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + ServiceResponse> * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IdentifierInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteIdentifiersAssignedToHostNameSinglePageAsync(final String name) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + NameIdentifierInner nameIdentifier = new NameIdentifierInner(); + nameIdentifier.withName(name); + return service.listSiteIdentifiersAssignedToHostName(this.subscriptionId(), apiVersion, this.acceptLanguage(), nameIdentifier, this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteIdentifiersAssignedToHostNameDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteIdentifiersAssignedToHostNameDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List all premier add-on offers. + * List all premier add-on offers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PremierAddOnOfferInner> object if successful. + */ + public PagedList listPremierAddOnOffers() { + ServiceResponse> response = listPremierAddOnOffersSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPremierAddOnOffersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all premier add-on offers. + * List all premier add-on offers. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPremierAddOnOffersAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPremierAddOnOffersSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPremierAddOnOffersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all premier add-on offers. + * List all premier add-on offers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PremierAddOnOfferInner> object + */ + public Observable> listPremierAddOnOffersAsync() { + return listPremierAddOnOffersWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all premier add-on offers. + * List all premier add-on offers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PremierAddOnOfferInner> object + */ + public Observable>> listPremierAddOnOffersWithServiceResponseAsync() { + return listPremierAddOnOffersSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPremierAddOnOffersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all premier add-on offers. + * List all premier add-on offers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PremierAddOnOfferInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPremierAddOnOffersSinglePageAsync() { + 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> result = listPremierAddOnOffersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPremierAddOnOffersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List all SKUs. + * List all SKUs. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SkuInfosInner object if successful. + */ + public SkuInfosInner listSkus() { + return listSkusWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * List all SKUs. + * List all SKUs. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listSkusAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listSkusWithServiceResponseAsync(), serviceCallback); + } + + /** + * List all SKUs. + * List all SKUs. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SkuInfosInner object + */ + public Observable listSkusAsync() { + return listSkusWithServiceResponseAsync().map(new Func1, SkuInfosInner>() { + @Override + public SkuInfosInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List all SKUs. + * List all SKUs. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SkuInfosInner 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 this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. + * Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. + * + * @param parameters VNET information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VnetValidationFailureDetailsInner object if successful. + */ + public VnetValidationFailureDetailsInner verifyHostingEnvironmentVnet(VnetParametersInner parameters) { + return verifyHostingEnvironmentVnetWithServiceResponseAsync(parameters).toBlocking().single().body(); + } + + /** + * Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. + * Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. + * + * @param parameters VNET information + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture verifyHostingEnvironmentVnetAsync(VnetParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(verifyHostingEnvironmentVnetWithServiceResponseAsync(parameters), serviceCallback); + } + + /** + * Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. + * Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. + * + * @param parameters VNET information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VnetValidationFailureDetailsInner object + */ + public Observable verifyHostingEnvironmentVnetAsync(VnetParametersInner parameters) { + return verifyHostingEnvironmentVnetWithServiceResponseAsync(parameters).map(new Func1, VnetValidationFailureDetailsInner>() { + @Override + public VnetValidationFailureDetailsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. + * Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. + * + * @param parameters VNET information + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VnetValidationFailureDetailsInner object + */ + public Observable> verifyHostingEnvironmentVnetWithServiceResponseAsync(VnetParametersInner parameters) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.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.verifyHostingEnvironmentVnet(this.subscriptionId(), parameters, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = verifyHostingEnvironmentVnetDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse verifyHostingEnvironmentVnetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Move resources between resource groups. + * Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void move(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { + moveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).toBlocking().single().body(); + } + + /** + * Move resources between resource groups. + * Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture moveAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(moveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope), serviceCallback); + } + + /** + * Move resources between resource groups. + * Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable moveAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { + return moveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Move resources between resource groups. + * Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> moveWithServiceResponseAsync(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.move(resourceGroupName, this.subscriptionId(), moveResourceEnvelope, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = moveDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse moveDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Validate if a resource can be created. + * Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ValidateResponseInner object if successful. + */ + public ValidateResponseInner validate(String resourceGroupName, ValidateRequestInner validateRequest) { + return validateWithServiceResponseAsync(resourceGroupName, validateRequest).toBlocking().single().body(); + } + + /** + * Validate if a resource can be created. + * Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture validateAsync(String resourceGroupName, ValidateRequestInner validateRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(validateWithServiceResponseAsync(resourceGroupName, validateRequest), serviceCallback); + } + + /** + * Validate if a resource can be created. + * Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * Validate if a resource can be created. + * Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Validate whether a resource can be moved. + * Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void validateMove(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { + validateMoveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).toBlocking().single().body(); + } + + /** + * Validate whether a resource can be moved. + * Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture validateMoveAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(validateMoveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope), serviceCallback); + } + + /** + * Validate whether a resource can be moved. + * Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable validateMoveAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { + return validateMoveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Validate whether a resource can be moved. + * Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> validateMoveWithServiceResponseAsync(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.validateMove(resourceGroupName, this.subscriptionId(), moveResourceEnvelope, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = validateMoveDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse validateMoveDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(204, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SourceControlInner> object if successful. + */ + public PagedList listSourceControlsNext(final String nextPageLink) { + ServiceResponse> response = listSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSourceControlsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body(); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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.body().nextPageLink(); + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSourceControlsNext(nextUrl, 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.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSourceControlsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GeoRegionInner> object if successful. + */ + public PagedList listGeoRegionsNext(final String nextPageLink) { + ServiceResponse> response = listGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listGeoRegionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGeoRegionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGeoRegionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GeoRegionInner> object + */ + public Observable> listGeoRegionsNextAsync(final String nextPageLink) { + return listGeoRegionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GeoRegionInner> object + */ + public Observable>> listGeoRegionsNextWithServiceResponseAsync(final String nextPageLink) { + return listGeoRegionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listGeoRegionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get a list of available geographical regions. + * Get a list of available geographical regions. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GeoRegionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGeoRegionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listGeoRegionsNext(nextUrl, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGeoRegionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGeoRegionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IdentifierInner> object if successful. + */ + public PagedList listSiteIdentifiersAssignedToHostNameNext(final String nextPageLink) { + ServiceResponse> response = listSiteIdentifiersAssignedToHostNameNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteIdentifiersAssignedToHostNameNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSiteIdentifiersAssignedToHostNameNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteIdentifiersAssignedToHostNameNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteIdentifiersAssignedToHostNameNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable> listSiteIdentifiersAssignedToHostNameNextAsync(final String nextPageLink) { + return listSiteIdentifiersAssignedToHostNameNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IdentifierInner> object + */ + public Observable>> listSiteIdentifiersAssignedToHostNameNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteIdentifiersAssignedToHostNameNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteIdentifiersAssignedToHostNameNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all apps that are assigned to a hostname. + * List all apps that are assigned to a hostname. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IdentifierInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteIdentifiersAssignedToHostNameNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSiteIdentifiersAssignedToHostNameNext(nextUrl, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteIdentifiersAssignedToHostNameNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteIdentifiersAssignedToHostNameNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List all premier add-on offers. + * List all premier add-on offers. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PremierAddOnOfferInner> object if successful. + */ + public PagedList listPremierAddOnOffersNext(final String nextPageLink) { + ServiceResponse> response = listPremierAddOnOffersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPremierAddOnOffersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List all premier add-on offers. + * List all premier add-on offers. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPremierAddOnOffersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPremierAddOnOffersNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPremierAddOnOffersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List all premier add-on offers. + * List all premier add-on offers. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PremierAddOnOfferInner> object + */ + public Observable> listPremierAddOnOffersNextAsync(final String nextPageLink) { + return listPremierAddOnOffersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all premier add-on offers. + * List all premier add-on offers. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PremierAddOnOfferInner> object + */ + public Observable>> listPremierAddOnOffersNextWithServiceResponseAsync(final String nextPageLink) { + return listPremierAddOnOffersNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPremierAddOnOffersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all premier add-on offers. + * List all premier add-on offers. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PremierAddOnOfferInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPremierAddOnOffersNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listPremierAddOnOffersNext(nextUrl, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPremierAddOnOffersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPremierAddOnOffersNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WorkerPoolResourceInner.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WorkerPoolResourceInner.java new file mode 100644 index 00000000000..c37983279d5 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/WorkerPoolResourceInner.java @@ -0,0 +1,169 @@ +/** + * 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.web.implementation; + +import com.microsoft.azure.management.web.ComputeModeOptions; +import java.util.List; +import com.microsoft.azure.management.web.SkuDescription; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.web.ProxyOnlyResource; + +/** + * Worker pool of an App Service Environment ARM resource. + */ +@JsonFlatten +public class WorkerPoolResourceInner extends ProxyOnlyResource { + /** + * Worker size ID for referencing this worker pool. + */ + @JsonProperty(value = "properties.workerSizeId") + private Integer workerSizeId; + + /** + * Shared or dedicated app hosting. Possible values include: 'Shared', + * 'Dedicated', 'Dynamic'. + */ + @JsonProperty(value = "properties.computeMode") + private ComputeModeOptions computeMode; + + /** + * VM size of the worker pool instances. + */ + @JsonProperty(value = "properties.workerSize") + private String workerSize; + + /** + * Number of instances in the worker pool. + */ + @JsonProperty(value = "properties.workerCount") + private Integer workerCount; + + /** + * Names of all instances in the worker pool (read only). + */ + @JsonProperty(value = "properties.instanceNames", access = JsonProperty.Access.WRITE_ONLY) + private List instanceNames; + + /** + * The sku property. + */ + @JsonProperty(value = "sku") + private SkuDescription sku; + + /** + * Get the workerSizeId value. + * + * @return the workerSizeId value + */ + public Integer workerSizeId() { + return this.workerSizeId; + } + + /** + * Set the workerSizeId value. + * + * @param workerSizeId the workerSizeId value to set + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withWorkerSizeId(Integer workerSizeId) { + this.workerSizeId = workerSizeId; + return this; + } + + /** + * Get the computeMode value. + * + * @return the computeMode value + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Set the computeMode value. + * + * @param computeMode the computeMode value to set + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withComputeMode(ComputeModeOptions computeMode) { + this.computeMode = computeMode; + return this; + } + + /** + * Get the workerSize value. + * + * @return the workerSize value + */ + public String workerSize() { + return this.workerSize; + } + + /** + * Set the workerSize value. + * + * @param workerSize the workerSize value to set + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withWorkerSize(String workerSize) { + this.workerSize = workerSize; + return this; + } + + /** + * Get the workerCount value. + * + * @return the workerCount value + */ + public Integer workerCount() { + return this.workerCount; + } + + /** + * Set the workerCount value. + * + * @param workerCount the workerCount value to set + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withWorkerCount(Integer workerCount) { + this.workerCount = workerCount; + return this; + } + + /** + * Get the instanceNames value. + * + * @return the instanceNames value + */ + public List instanceNames() { + return this.instanceNames; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public SkuDescription sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withSku(SkuDescription sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/package-info.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/package-info.java new file mode 100644 index 00000000000..50614b0fc27 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the implementation classes for WebSiteManagementClient. + * WebSite Management Client. + */ +package com.microsoft.azure.management.web.implementation; diff --git a/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/package-info.java b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/package-info.java new file mode 100644 index 00000000000..f67750e1454 --- /dev/null +++ b/azure-mgmt-web/src/main/java/com/microsoft/azure/management/web/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the classes for WebSiteManagementClient. + * WebSite Management Client. + */ +package com.microsoft.azure.management.web;